Welcome Guest, Not a member yet? Register   Sign In
Destroy session on window close
#11

[eluser]bikuta[/eluser]
cool, thanks alot!
#12

[eluser]Rick Jolly[/eluser]
[quote author="Aea" date="1210738757"]PHP will not have that behavior, sessions do not magically expire when the browser closes because they are stored on the disk...[/quote]
Wrong. Don't confuse native php sessions with CI sessions. As I've said, native sessions do expire when the browser closes by default. That's because sessions are stored in browser memory by default, not on disk. AFAIK, CI sessions don't support this. See here for a patch: http://ellislab.com/forums/viewthread/70036/

No need for some javascript hack.
#13

[eluser]bikuta[/eluser]
Ah ok. I hope they incorporate that to CI.
#14

[eluser]metamorpher[/eluser]
I don't get it... like refreshing or killing the cookie will just make my user to login again... I can't get the logic of it...

that's why I store in my session the property is_logged_in=1, which is so insecure... hopefully I'm still playing in my sandbox (localhost)...

matching session_id against new ones is such a pain in the ass, so... how can I do it??? just check if session_id is empty or isset?

can somebody give a hand please???... I was so into PHP native session library ='(




Theme © iAndrew 2016 - Forum software by © MyBB