[eluser]Haloperidol[/eluser]
[quote author="helphelp" date="1246755334"][quote author="Haloperidol" date="1246687901"]The expiration clock only starts to tick after the last activity on the session, and resets on every acivity (code from the session library):
Code:
if (($session['last_activity'] + $this->sess_expiration) < $this->now)
{
$this->sess_destroy();
return FALSE;
}
Maybe you could store the login time in the session and destroy the session in the code after the preferred ammount of time?[/quote]
Thanks for reply.
i am confused. As you mention, "The expiration clock only starts to tick after the last activity on the session". It actually doing what i want. Destory the session after inactivity for "sess_expiration" time? And the user can stay online forever if he active within "sess_expiration" time??
Thanks[/quote]
Yes thats right, the session will not be destroyed if the user is active. I only advised to store the login time in a variable because i thought you want to force the user to logout even if he was active.