HOWTO: Only allow 1 instance of the same user to l

Results 1 to 2 of 2

Thread: HOWTO: Only allow 1 instance of the same user to l

  1. #1
    Join Date
    Dec 1969

    Default HOWTO: Only allow 1 instance of the same user to l

    Hi Guys (and Gals),<BR><BR>I am trying to figure out how to RELIABLY check if a user is already logged in and therefore stop a seperate user session loggin in at the same time with the same credentials.<BR><BR>For example:<BR><BR>Lets say that my membership website only has 2 users in the DB.<BR><BR>Joe Bloggs and Joe Public.<BR><BR>I don&#039;t want to allow two simultaneous sessions to both log in as Joe Bloggs.<BR><BR>The only way I could think of was to use an Application Array (HA HA!) to track UserID&#039;s against the users Session ID.<BR><BR>However, I have tried everything I can think of now and still have made no progress! Surely this can&#039;t be THAT difficult, can it?<BR><BR>All suggestions welcomed! Many thanks in advance.<BR><BR>:)

  2. #2
    Join Date
    Dec 1969

    Default Well, it really isn't difficult..

    .. except for the fact that the Global.asa Session_OnEnd event is buggy and doesn&#039;t always fire.<BR><BR>So, you are basically left to do it yourself.<BR><BR>Create a database table that you insert a record when the user signs in. Set an Expiry field to be the current time + the session timeout. Then, just keep updating that Expiry field as the user browses the site.<BR><BR>Then, when you go to login, check to see if a session already exists in that table.

Posting Permissions

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