X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=DataObjects%2FCore_person.php;h=27304926750ef12f3cf634faa7590ccc474b35a9;hp=95beb5a5405975a2e6ad3395c4e21d620f4669b7;hb=ff5b0281f185ed54b97247129d31c28a4fbb13c1;hpb=cfd6af2b45b4112d6646590b79a18040b9f02df5 diff --git a/DataObjects/Core_person.php b/DataObjects/Core_person.php index 95beb5a5..27304926 100644 --- a/DataObjects/Core_person.php +++ b/DataObjects/Core_person.php @@ -672,15 +672,13 @@ 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'); - if(!empty($oath_require) || $oath_require == 0) { - - $aur['require_oath'] = 1; - } + + $aur['require_oath'] = !empty($oath_require) || $oath_require->val == 0 ? 0 : 1; return $aur; }