Counter for login system

Author Message
LoganYoung

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 8/4/2009
  • Status: offline
Counter for login system Tuesday, August 04, 2009 3:08 AM (permalink)
0
I had an idea for a login system that I want to create. It's a little more complicated than the average username & password scenario.
The system requires a valid user id to be entered. This user id is then validated. If a matching user id is found in the database, then login continues with a prompt for username and password.

The user attempting to log in gets 3 chances. If, by the third attempt, valid user credentials haven't been entered, the account is locked. When this happens, an email gets sent to the
email address associated with the user account with information on when the account was locked, and supplies a randomly generated password that will unlock the account.

I know how to randomly generate the password for recovery of the user account and how to send the mail, I'm just having a little problem with the login count up to three.
I know a For loop should work, but I can't seem to work out how to use one, I'll need to record the current count on the form, and update it on the handler, and then send it back to the form,
does anyone have any ideas on how I should do this?

I've already figured out how to make sure the password the user is sent in the mail matches the one that will unlock the account, so I don't need to worry about that so much.

Thanks in advance for the help!!!
If you were meant to understand it, it wouldn't be called CODE
 
#1
    webber123456

    • Total Posts : 58
    • Scores: 0
    • Reward points : 0
    • Joined: 9/20/2007
    • Status: offline
    Re:Counter for login system Saturday, August 29, 2009 4:24 AM (permalink)
    0
    use session value or cookies
     
    #2
      jsjay9

      • Total Posts : 6
      • Scores: 0
      • Reward points : 0
      • Joined: 9/10/2009
      • Status: offline
      Re:Counter for login system Thursday, September 10, 2009 6:48 PM (permalink)
      0
      A better choice might be to write each attempt to a counter field on the user record in the database.

      Once a valid login is completed, reset the counter to 0.

      This way prevents tampering with the cookie or session var (although I have never seen a problem with session vars..)
       
      #3

        Online Bookmarks Sharing: Share/Bookmark

        Jump to:

        Current active users

        There are 0 members and 1 guests.

        Icon Legend and Permission

        • New Messages
        • No New Messages
        • Hot Topic w/ New Messages
        • Hot Topic w/o New Messages
        • Locked w/ New Messages
        • Locked w/o New Messages
        • Read Message
        • Post New Thread
        • Reply to message
        • Post New Poll
        • Submit Vote
        • Post reward post
        • Delete my own posts
        • Delete my own threads
        • Rate post

        2000-2012 ASPPlayground.NET Forum Version 3.9