Welcome Guest, Not a member yet? Register   Sign In
on session timeout event
#1

[eluser]Unknown[/eluser]
Hi,

Is it possible to perform an action on the event of a session timeout? Basically, I want to clear up some database tables when a user's session expires.

Thanks.

P.S. Codeignitor is possibly the best web app framework I've used, great stuff!
#2

[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums.

I don't think it's possible because once the session has expired, the server has no way of knowing this at the framework level. That is, of course, unless you set up another database table that has a row corresponding to the user that's updated on each request with the time that the session expires. This way you will be able to tell when a session has expired by seeing if the date in the corresponding row is less than the current date. This doesn't have to be a standalone table - it could also be a field in the users table.




Theme © iAndrew 2016 - Forum software by © MyBB