3 Replies - 2518 Views - Last Post: 13 October 2011 - 06:00 PM Rate Topic: -----

#1 phpmyworld  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 5
  • Joined: 11-October 11

Login Script Account Locked After 4th Try

Posted 13 October 2011 - 05:43 PM

Hello every one.

As i've asked in one of posts on redirecting usernames to their on personal pages, using id's IA now have another question regarding the fail part of the login.

For my security standards I want to set it as this.

A user logs in once incorrectly, an error message pops up saying "You have entered an incorrect email or password"
The second time it says "Accounts will become locked until 4th try, once locked an email will be sent to you to unlock your account"
And contuines until 4th try which will say: "Your account has been locked due to 4 unsuccessful logins. Your account will remain locked until you check your email."

And also how could i keep the account so the user cannot log in untill they unlock their account/

I am using mysql to let you know, and I was curious if their is a way if my login knows how many times its been used incorrectly to enter an email and password, and once on the forth try it can genrate a pre-made email with a new randomly genarated link to unlock the account.
Maybe I could put 3 = Locked account?

If you are confused please let me know what parts are confusing, i wrote this quickly to get an answer so i can move on with my project.

Thanks in advance!

Is This A Good Question/Topic? 0
  • +

Replies To: Login Script Account Locked After 4th Try

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13947
  • View blog
  • Posts: 55,683
  • Joined: 12-June 08

Re: Login Script Account Locked After 4th Try

Posted 13 October 2011 - 05:49 PM

In the table you use for the user name/login - have an integer counter column. Default set to zero. Before the login is validated, check that user name's integer column. If four or greater have your code deny access. Each failed attempt updates that column (based on the user name) by one. A successful login sets that counter column back to zero.
Was This Post Helpful? 2
  • +
  • -

#3 phpmyworld  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 5
  • Joined: 11-October 11

Re: Login Script Account Locked After 4th Try

Posted 13 October 2011 - 05:58 PM

Ok thanks on the integer part. But when the account is locked how do I genrate an email thats sends a unlock confirm?
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13947
  • View blog
  • Posts: 55,683
  • Joined: 12-June 08

Re: Login Script Account Locked After 4th Try

Posted 13 October 2011 - 06:00 PM

I forget the specifics but there the information is in a tutorial I wrote a while back.

http://www.dreaminco...ailed-to-owner/
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1