Welcome Guest, Not a member yet? Register   Sign In
Session is not destroyed when the window is closed
#1

[eluser]Huji[/eluser]
Hi,

The typical behaviour we experience is that when we log into a web site which uses session variables for authentication, if we close the browser window and open it again, we have to log in again.

I created a simple site and used Simplelogin library for authentication. However, when I close the browser and open it again, I'm still logged in. I checked the code and as far as I understand it, Simplelogin is using CodeIgniter's built-in session functions to handle the authentication process:

Code:
$this->CI->session->set_userdata(array('logged_in' => true));

I can't figure why this is happening. Is it that CodeIgniter's built-in functions for session, are using cookies in a way that has this side effect? Or is it me missing something here?
#2

[eluser]Ryuuzaki92[/eluser]
The cookie might have been set an expiry date. It no expiry date is given while setting the cookie, the cookie will be deleted after the user closes the browser.




Theme © iAndrew 2016 - Forum software by © MyBB