+ if(!empty($q['two_factor_auth_code'])) {
+ $person = DB_DataObject::factory('core_person');
+ $person->get($q['id']);
+ $o = clone($person);
+ $person->oath_key = $_SESSION[__CLASS__]['oath'][$person->id];
+
+ if($person->checkTwoFactorAuthentication($q['two_factor_auth_code'])) {
+ $person->update($o);
+ unset($_SESSION[__CLASS__]['oath'][$person->id]);
+ $roo->jok('DONE');
+ }
+
+ $roo->jerr('_invalid_auth_code');
+ }
+
+ if(!empty($q['oath_key_disable'])) {
+ $person = DB_DataObject::factory('core_person');
+ $person->get($q['id']);
+
+ $o = clone($person);
+
+ $person->oath_key = '';
+ $person->update($o);
+
+ $roo->jok('DONE');
+ }
+