$user = $default_admin ? $default_admin->toArray() : $u->toArray();
// if we request other URLS.. then we get auto logged in..
- self::$authUser = $u;
+ self::$authUser = $user;
//$_SESSION[get_class($this)][$sesPrefix .'-auth'] = serialize((object) $user);
return true;
}
$_SESSION[get_class($this)][$sesPrefix .'-auth-timeout'] = time() + (30*60); // eg. 30 minutes
setcookie('Pman.timeout', time() + (30*60), time() + (30*60), '/');
}
-
+ // not really sure why it's cloned..
return clone (self::$authUser);