DataObjects/Core_person.php
authorjohn <john@roojs.com>
Tue, 9 Oct 2018 11:00:48 +0000 (19:00 +0800)
committerjohn <john@roojs.com>
Tue, 9 Oct 2018 11:00:48 +0000 (19:00 +0800)
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');
             }