DataObjects/Core_person.php
[Pman.Core] / DataObjects / Core_person.php
index 6ef88a6..dc87f56 100644 (file)
@@ -803,13 +803,14 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject
         
         if(!empty($q['two_factor_auth_code'])) {
             
+            $person = $this;
+            
             if(isset($q['id'])) {
                 $person = DB_DataObject::factory('Core_person');
                 $person->get($q['id']);
-                $person->checkTwoFactorAuthentication($q['two_factor_auth_code']);
             }
             
-            if($this->checkTwoFactorAuthentication($q['two_factor_auth_code'])) {
+            if($person->checkTwoFactorAuthentication($q['two_factor_auth_code'])) {
                 $roo->jok('DONE');
             }