Print Page | Close Window

how to avoid user login in the same time

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=3845
Printed Date: 30 March 2026 at 10:06am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: how to avoid user login in the same time
Posted By: haj282
Subject: how to avoid user login in the same time
Date Posted: 26 June 2003 at 2:18am

For example: at some ASP forum, At the same time , I can use my account login at two or more different computers.

I don't want this happen,what can I do ?

where can I find the ASP codes to avoid this happen?

THX!!




Replies:
Posted By: Gullanian
Date Posted: 26 June 2003 at 3:00am

Only way I can think of is to do something with the session object



Posted By: Gary
Date Posted: 26 June 2003 at 4:19am

Either that, or maintain a db table with a list of currently logged on users.

When a user tries to log on, check to see if the userid already exists in the table.

The only problem is ensuring that the userid is removed from the table when they log off. If they simply close their browser without logging off, they will never be able to log on again.

Therefore, the session object ooption is most likely better - at least the session will eventually expire, thus allowing the user to log on again.



Posted By: ultramods
Date Posted: 26 June 2003 at 8:13am

Would you not need to use the session object and a database.

When a user logs in set loggedIn = true in database then pass username to session.
Then use session on End with a short expiry to set loggedIn = false in database when their session ends.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net