projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
14c5e43
)
DataObjects/Core_person.php
author
john
<john@roojs.com>
Thu, 11 Oct 2018 03:50:50 +0000
(11:50 +0800)
committer
john
<john@roojs.com>
Thu, 11 Oct 2018 03:50:50 +0000
(11:50 +0800)
DataObjects/Core_person.php
patch
|
blob
|
history
diff --git
a/DataObjects/Core_person.php
b/DataObjects/Core_person.php
index
f0c839b
..
88e6ab8
100644
(file)
--- a/
DataObjects/Core_person.php
+++ b/
DataObjects/Core_person.php
@@
-777,8
+777,11
@@
class Pman_Core_DataObjects_Core_person extends DB_DataObject
$hash = $this->generateOathKey();
$hash = $this->generateOathKey();
- $_SESSION[__CLASS__] = isset($_SESSION[__CLASS__]) ? $_SESSION[__CLASS__] : array();
- $_SESSION[__CLASS__]['oath'] = isset($_SESSION[__CLASS__]['oath']) ? $_SESSION[__CLASS__]['oath'] : array();
+ $_SESSION[__CLASS__] =
+ isset($_SESSION[__CLASS__]) ? $_SESSION[__CLASS__] : array();
+ $_SESSION[__CLASS__]['oath'] =
+ isset($_SESSION[__CLASS__]['oath']) ? $_SESSION[__CLASS__]['oath'] : array();
+
$_SESSION[__CLASS__]['oath'][$person->id] = $hash;
$qrcode = $person->generateQRCode($hash);
$_SESSION[__CLASS__]['oath'][$person->id] = $hash;
$qrcode = $person->generateQRCode($hash);
@@
-798,12
+801,8
@@
class Pman_Core_DataObjects_Core_person extends DB_DataObject
$person->oath_key = $_SESSION[__CLASS__]['oath'][$person->id];
if($person->checkTwoFactorAuthentication($q['two_factor_auth_code'])) {
$person->oath_key = $_SESSION[__CLASS__]['oath'][$person->id];
if($person->checkTwoFactorAuthentication($q['two_factor_auth_code'])) {
-
-
$person->update($o);
$person->update($o);
-
unset($_SESSION[__CLASS__]['oath'][$person->id]);
unset($_SESSION[__CLASS__]['oath'][$person->id]);
-
$roo->jok('DONE');
}
$roo->jok('DONE');
}