I have a scenario like this:
UserJoe has session_id abc123
abc123 is stored in UserJoe's row in the users table in the DB.
UserJoe calls AdminBob and reports a problem.
AdminBob needs to experience UserJoe's problem first hand
So, I'd like to do something like:
01| $sessionId = getSessionId("UserJoe");
02| changeToExistingSession($sessionId);
03| if($_SESSION["name"] == "UserJoe") echo "successfully changed users";
Line 02 is where I'm kinda stuck... Any ideas?
(preferably not using session_save_path()
anywhere :P)
EDIT: And it's just for the duration of the page execution. I'd like to keep AdminBob's session cookie intact.