*
* 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);