Session end

Results 1 to 2 of 2

Thread: Session end

  1. #1
    Join Date
    Dec 1969

    Default Session end

    I have an application where user log in to the system. When User log in I put his name in Database column, which indicates if user is logged in or not. Once user log out I remove that name from database. That way that user can only access to that system once at a time. If he wants to log in from some other computer, he wont be able to since his name already exist in the table. <BR>Everything works fine as long as user logs off after they use. <BR><BR>Here&#039s my problem: what if the user hits the back button, closes the browser, or otherwise exits the page abnormally? The database will still say the user is logged in.<BR><BR><BR>I have on_sessionEnd function where I unlock the Database by deleting from database. But the problem is it does not unlock right away, It waits till the session timesout. Is there a way to detect if the browser is closing,or user has moved to another <BR>domain.<BR><BR>Any help or Idea will be appreciated. Thanx in Advance

  2. #2
    Join Date
    Dec 1969

    Default RE: Session end

    you need to run some function (like exe or smth)<BR>which will check the db for old sessions in two possible ways<BR>1) some long period old (like a day)<BR>2) in your code update Last Click of user, and while cleaning the db check if Last Click is older then allowed session timeout

Posting Permissions

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