Welcome Guest, Not a member yet? Register   Sign In
Logout first user, when same user login from other system.
#1

[eluser]Arun Joshi[/eluser]
Hi

I have to implement this functionality. If a user logged in to system a, when the same user logged in from an other system, that user should be logged out from the system a. Am not storing sessions now.

-Arun
#2

[eluser]smilie[/eluser]
Well good for you :-)

Not sure how to implement this. Based on IP you could find out if more then one user (system) is logged in. But even if you do find that out - how would you log out first user?

I do not know if this would be possible.

Good luck anyway Smile

Cheers,
Smilie

PS. Do not forget to post a question next time as well ;-)
#3

[eluser]Nick_MyShuitings[/eluser]
Hehe...

Even though you didn't ask a question... (@smilie - I like the abundant smilies in your post... fitting)

You should be able to modify your login function and have it kill the session for that user if you are using db session. Ie, as it creates the new session for the user, it could check if there is already a session for that user at a different IP, and delete that db entry.

As long as your auth library is checking the session, the next time they attempt to do anything at the old computer they should get rerouted to the logon screen.

Interesting in that I can't believe I never thought of adding this to my auth class.




Theme © iAndrew 2016 - Forum software by © MyBB