Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - how to avoid user login in the same time
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

how to avoid user login in the same time

 Post Reply Post Reply
Author
haj282 View Drop Down
Newbie
Newbie
Avatar

Joined: 10 May 2003
Location: China
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote haj282 Quote  Post ReplyReply Direct Link To This Post Topic: how to avoid user login in the same time
    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!!

Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2003 at 3:00am

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

Back to Top
Gary View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 March 2002
Location: United Kingdom
Status: Offline
Points: 326
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gary Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
ultramods View Drop Down
Groupie
Groupie
Avatar

Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote ultramods Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.