locked
How to restrict other user to log in from same credential? RRS feed

  • Question

  • User1502990794 posted

    hello every one,

    Please help me to find solution in: If admin has already logged in application and other user trying to logged in with same admin credential from other browser/system so he should prompt that admin is already logged in. As I know sessions are identify based on request coming from the browser. Please help me.

    Saturday, April 27, 2013 1:51 AM

Answers

All replies

  • User-1618234021 posted

    See the following 2 examples:

    http://www.eggheadcafe.com/articles/20030418.asp

    http://www.eggheadcafe.com/articles/20030416.asp

    The above 2 are discussing how to prevent multiple logins by a user. Admin or any user.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, April 27, 2013 2:10 AM
  • User2108829372 posted

    You can use application scope to store some information about admin login and every login should be checked against this.

    Also you need to make sure you clear this information in logout and session_end.in case if the user closes the browser with out logout the application should have logic to remove the session else the user wont be able to login until session expires.

    Hope this helps

    Saturday, April 27, 2013 2:46 AM
  • User-1252206308 posted

    Update login timestamp in DB against admin user and check if user is logged in or not.

    Sunday, April 28, 2013 10:49 AM