Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Lock users on unsuccessful logins?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Lock users on unsuccessful logins?

 Post Reply Post Reply
Author
martha View Drop Down
Groupie
Groupie
Avatar

Joined: 28 February 2005
Location: Greece
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote martha Quote  Post ReplyReply Direct Link To This Post Topic: Lock users on unsuccessful logins?
    Posted: 03 May 2005 at 2:16pm
Hello!!!
Is there any way to lock users on usuccessful logins?
I want to avoid anyone trying to login as admin.
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 2005 at 3:31pm
what do you mean by lock?

can't access the site? or can't try to login again and can view the site?

it can be done , no sure way but you can use cookies, if a value send them away, or session veriables.... and/or store the IP Address , thats not fool proff though
Back to Top
pjb007 View Drop Down
Groupie
Groupie


Joined: 03 September 2004
Location: United Kingdom
Status: Offline
Points: 185
Post Options Post Options   Thanks (0) Thanks(0)   Quote pjb007 Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 2005 at 4:39pm
Could it not work on a simpler basis
 
For example take a user with the name
mrweb
 
If mrweb goes to your forum and enters the incorrect details then a value changes in the database the value could start at 0 and would increase by 1 for every incorrect guess, if it was equal to 3 then the account locks no matter what computer or IP address you use you can't get in because the value in the database is equal to 3, it could either locked like that for a pre-defined time or need an admin to reset the value.
 
If you get the password wrong on the first try and right on the second go, the field resets to 0 on login as its not 3 incorrect passwords in a row.
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 2005 at 4:58pm
ok add a new field to the DB.

then on the login page when a inccorect value use aupdate SQL to add 1 to the field. then if 3 always return false.

but if correct within three where the last login time is done add the counted field setting the value back to 0

then to actually stop the user .. in the common.asp page change the query that uses the Usercode to log the user in.. set the query to also check the user_code but also WHERE tblAuthor.Count = 0

if they dont equal 0 set them to a guest account .. or you can not check within the query and bring the value in.. where the user details are bought in.

then do a if statement saying if >2 then blnActiveUser = False

set them to inactive
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 2005 at 6:19pm
How would you unlock them if they remember their password later?
You'd also need to reset the counter on a password reset.

Lead me not into temptation... I know the short cut, follow me.
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.