Forum Moderators: coopster
$security_hash = util::hash($this->user->id . time());
setcookie('security_hash', $security_hash, time() + 3600);
$_COOKIE['security_hash'] = $security_hash;
$_SESSION['user'] = array(
'id' => $this->user->id,
'security_hash' => $security_hash
);
I personally would reset the cooke, ie, set the 'security_hash' to zero - check that this is physically done - then re-instantiate it with your new data & time.
But by looking at your code, it looks like your trying to rewrite it twice, because the third line doesn't assign time to it