Welcome Guest, Not a member yet? Register   Sign In
RICK: Any solution yet, to get session expired on browser close?
#8

[eluser]nuwanda[/eluser]
This was bugging me, too, then I found this thread. But I suspected there had to be an easier solution.

I think there is.

The CI cookie helper allows you to set a cookie with duration 0, which kills the cookie when the browser closes. This acts as a true session indicator.

Why not simply create a cookie with duration=0 to kill the session, or duration=required_time_in_secs for a remember me option?

You check for the presence of the cookie next time to see if the user needs to be logged in based upon the data in the regular CI session cookie.


Messages In This Thread
RICK: Any solution yet, to get session expired on browser close? - by El Forum - 04-20-2010, 07:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB