X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=DataObjects%2FCore_person.php;h=95beb5a5405975a2e6ad3395c4e21d620f4669b7;hb=cfd6af2b45b4112d6646590b79a18040b9f02df5;hp=f2cb1fddbae23abcf6640621c75f25607de507c3;hpb=9cc9d876793dd58f9f2e4a9717ed4a828ad4159e;p=Pman.Core diff --git a/DataObjects/Core_person.php b/DataObjects/Core_person.php index f2cb1fdd..95beb5a5 100644 --- a/DataObjects/Core_person.php +++ b/DataObjects/Core_person.php @@ -522,6 +522,8 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject { // also used in login + return true; + require_once 'System.php'; if( @@ -670,13 +672,15 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject $aur['passwd'] = ''; $aur['dailykey'] = ''; $aur['oath_key'] = ''; - + $aur['require_oath'] = 1; $aur['oath_key_enable'] = !empty($this->oath_key); $s = DB_DataObject::Factory('core_setting'); $oath_require = $s->lookup('core', 'two_factor_authentication_requirement'); - - $aur['disable_oath'] = (bool) ? 1 : 0; + if(!empty($oath_require) || $oath_require == 0) { + + $aur['require_oath'] = 1; + } return $aur; }