I want to be able to destroy a session from another user, i.e. An administrator can log other users out. Is it possible to use the session ID to do this as i have this stored?
Destroying a session started by someone else
1 reply to this topic
Posted 27 July 2006 - 03:50 PM
The following code should do it:
//end any open sessions session_write_close(); //start session to be destroyed session_id($id_of_session_to_destroy); session_start(); //dstroy the session $_SESSION=array(); session_destroy();
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users