Is there a way to log out when user close the browser instead of clicking on the link to log out? Would I have to use session_gc_maxlifetime in order to make sure that the user is logged out?
Thanks, Tom
Sekka
4:05 pm on Jul 7, 2006 (gmt 0)
If you are doing your login system by SESSION, when the browser is closed, the SESSION is wiped, so there should be no need.
coopster
5:17 pm on Jul 7, 2006 (gmt 0)
It all depends on the lifetime of the cookie you are setting. If it is set to expire at the end of the session (when the browser closes) then the cookie will not be stored in the user's browser setting anymore. The actual associated session data itself will still remain orphaned on the server though -- and that is where garbage collection kicks in and does cleanup on the pre-determined cycle you specified in your configuration.