I have the following problem:
- User X login in PC1, with session_id 1000. Leaves but forgot logout.
- User X login in PC2, with session_id 1001.
- Before session 1000 timeout, user Y get access in PC1 as user X, with session_id 1000.
In this way, two users get access as the same user, in different PCs, and different session ids. What I wanna do is store the new session_id each time a user login (done), and delete the previously stored session_id. But I don't know how to delete or modify a session file given the id, without changing the current session.
I mean, I wanna do the following:
- User X login in PC1, with session_id 1000. Script stores 1000 as last_session_id. Leaves but forgot logout.
- Same user login in PC2, with session_id 10001. Script get last_session_id (1000) and delete that session info; then stores 1001 as the new last_session_id.
- User Y goes to PC1, with session_id 1000, but can't get access as X because the info was deleted.
Can *session_id(old_session)* work properly? Or that function just rename the current session id, but mantain the values?
Thanks in advance.