Welcome Guest, Not a member yet? Register   Sign In
on-session-end functions?
#4

[eluser]ramabodhi[/eluser]
okay so how would i go about doing this to toggle the 'online' field in the 'users' table, so that when a search for users is displayed, in the last_login column i want it to display 'online' if the user is online...

my initial method was to have the field toggled to true in my login function, and toggled to false in the sess_destroy function....

is there a way to check for all open sessions? if so i can have a database field set to session_id every login.. then run a chron job run every (few minutes?) to match all open session id's to my user table and any session id found in the database thats not open will toggle online field to false..

or is there an easier way?


Messages In This Thread
on-session-end functions? - by El Forum - 04-26-2009, 11:48 PM
on-session-end functions? - by El Forum - 04-26-2009, 11:52 PM
on-session-end functions? - by El Forum - 04-27-2009, 03:33 AM
on-session-end functions? - by El Forum - 04-27-2009, 06:56 PM
on-session-end functions? - by El Forum - 04-27-2009, 07:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB