Welcome Guest, Not a member yet? Register   Sign In
Detect when a session times out and execute a function
#6

[eluser]sandwormusmc[/eluser]
Not sure if this would work for you, but how about an AJAX call to a CI function that checks user's last activity against current time? If it's past a certain threshold, have it destroy the session, clear your inventory, and spit back javascript code to redirect that user to a "sorry, your session expired" page ... including JS code to do that in the header or footer wouldn't be too hard, especially using MooTools another JS framework of your choice.

If you need an example, let me know and I can throw something together ...


Messages In This Thread
Detect when a session times out and execute a function - by El Forum - 03-21-2008, 04:26 AM
Detect when a session times out and execute a function - by El Forum - 03-21-2008, 04:49 AM
Detect when a session times out and execute a function - by El Forum - 03-21-2008, 05:26 AM
Detect when a session times out and execute a function - by El Forum - 03-21-2008, 09:54 AM
Detect when a session times out and execute a function - by El Forum - 03-21-2008, 10:00 AM
Detect when a session times out and execute a function - by El Forum - 03-21-2008, 10:31 AM
Detect when a session times out and execute a function - by El Forum - 03-21-2008, 10:34 AM
Detect when a session times out and execute a function - by El Forum - 03-21-2008, 11:08 AM
Detect when a session times out and execute a function - by El Forum - 03-21-2008, 02:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB