Is there a way of modifying the $maxlifetime for SessionHandler::gc ( int $maxlifetime )
?
I want to be able to check if the session is admin session or frontend session.
If it's admin session then the $maxlifetime = 15 minutes
and frontend session to be $maxlifetime = 1 hour
. Can the $maxtimelife
be edited like that?
public function gc($maxlifetime) {
foreach (glob("$this->savePath/sess_*") as $file) {
if (filemtime($file) + $maxlifetime < time() && file_exists($file)) {
unlink($file);
// Check if it's admin session....(as this should happen after 15 mins)....
// Remove Auth_Key
}
}
return true;
}