CI Sessions not deleting? |
[eluser]Zero-10[/eluser]
I'm starting a new pet project for the fun of it and this time I'm not going to use phpBB to manage users, sessions etc... and I have found myself in a tight spot. You see, if I logout, it will call this function... Code: function logout() It logs me out fine, but when I log back in as a different person, my other username is still there and then I refresh and it'll be replaced with the new logged in one. If I access that section that should normally be restricted, it will work until i refresh if I'm not logged in. I checked the database and it creates and deletes sessions just fine. Could it be that the cookie stored on my computer has a problem with it? If so, what can I do to make it expire when I logout? Thank you!
[eluser]4ever[/eluser]
I am just learning this step. See this tut starting at time 0:49:39 http://net.tutsplus.com/articles/news/co...y-6-login/
[eluser]Zero-10[/eluser]
Thanks for the reply but netuts won't be helpful to resolute my problem, in fact a lot of the code in the video is for understanding how things work and not for practical use. I could in theory do something ugly and that's to create a variable to refresh the current page once and then redirect to the login page before it loads the page but that would be ugly. Cursed cache
[eluser]Gerep[/eluser]
Try to destroy the session when you load the login view or before you set the session with the user information.
[eluser]InsiteFX[/eluser]
Code: function logout() InsiteFX |
Welcome Guest, Not a member yet? Register Sign In |