How to prevent multiple log ins using same user id

Results 1 to 3 of 3

Thread: How to prevent multiple log ins using same user id

  1. #1
    Binu Jacob Guest

    Default How to prevent multiple log ins using same user id

    Hi,<BR><BR>I want to prevent users of my site from multiple logging in simultaneously using the same user id. I&#039;m using ASP & SQL Server. How can I do this? I&#039;ll be so thankful to those who suggests a proper solution.<BR><BR>Thanks,<BR>Binu Jacob

  2. #2
    Join Date
    Dec 1969

    Default RE: How to prevent multiple log ins using same use

    Try this:<BR>When the user logs in have a timestamp written to the database coresponding with the user name. You&#039;ll probably want to use the seconds since some time, which I can&#039;t think of the variable for right now. Then each link on the password protected pages will have to have a ?timestamp=(time stamp in database) and then have the page that is loaded check the timestamp agains the one in the database. When the user logs in again they will create a new time stamp which means that the links that are in another window will no longer work since the time stamps will no longer be valid.

  3. #3
    Join Date
    Dec 1969

    Default But you have to rely on the user to log out

    exclusively once he is done. What you can do is, add a column to the table where you check for username and password and name the column say "logged" and the moment a user logs in make the value "Y", now next time whenever someone tries to log-in you will check if the value is "Y" then someone is already logged in so dont let the other user in. But as I said, they should LOG OUT exclusively, what if someone logs in and then after finishing the work goes to some other site and doesnt log out from your site, so he is still in there and no other person will be able to log in too.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts