projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
daf8caf
)
DataObjects/Core_person.php
author
Alan Knowles
<alan@roojs.com>
Thu, 17 Dec 2020 06:14:20 +0000
(14:14 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 17 Dec 2020 06:14:20 +0000
(14:14 +0800)
DataObjects/Core_person.php
patch
|
blob
|
history
diff --git
a/DataObjects/Core_person.php
b/DataObjects/Core_person.php
index
f9abe5c
..
bb2a760
100644
(file)
--- a/
DataObjects/Core_person.php
+++ b/
DataObjects/Core_person.php
@@
-546,7
+546,18
@@
class Pman_Core_DataObjects_Core_person extends DB_DataObject
*
* eg. genAutoLoginURL($sub, $expires)
*/
-
+ function genAutoLoginURL($url, $expires = false) {
+ {
+ $expires = $expires === false ? strtotime("NOW + 1 WEEK") : $expires;
+ return $url.'/'.$this->id .'/'.$expires.'/'.
+ hash('sha254',
+ serialize(
+ array($url, $time, $this->passwd)
+ )
+ );
+
+ }
+
function validateAutoLogin($called)
{
$bits = explode($called);