CodeIgniter Forums

Full Version: Autologin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

I have a checkbox which says "[] Keep me logged in" on my website upon login. I just realized that codeigniter has autologin feature, what if the users don't want to autologin?

So the session is set to 2 hours, this means within two hours you can close and open your browser, you will still be logged in. What if the user wants to logout by closing the browsers.. How would I do something like that? I was thinking about making a autologin feature with cookies, then I realized that codeigniter has it now I want to make an option for the users to manage their login.

Any help is appreciated, thanks!

El Forum

[eluser]Cristian Gilè[/eluser]
The expiration of session when the browser window is closed is a new feature in CI2.

Take a look at how it has been implemeted:

Cristian Gilè