looking for a 'change password' solution

Discussion in 'ASP General' started by Danny, Jul 12, 2004.

  1. Danny

    Danny Guest

    Hello
    I am looking for an asp change password solution. I know there are very
    efficient ways of doing it and perhaps you have some samples or ideas.

    Basically I would like the user to be able to change their password. Then a
    link is mailed to their email address on file and when they click on the
    link, they are taken to a place to type in a new password.

    Thanks in advance

    Danny
    Danny, Jul 12, 2004
    #1
    1. Advertising

  2. Danny

    Patrice Guest

    Generally this is done using 3 textboxes :
    - one for the old password
    - and two to enter the new password twice

    The mail is rather used sometimes when someione lost his password. In some
    cases a new one is generated and mailed back to the user. A link reminds
    where they can change the autogenerated password if they prefer...

    Patrice

    --

    "Danny" <> a écrit dans le message de
    news:ZCvIc.885$...
    > Hello
    > I am looking for an asp change password solution. I know there are very
    > efficient ways of doing it and perhaps you have some samples or ideas.
    >
    > Basically I would like the user to be able to change their password. Then

    a
    > link is mailed to their email address on file and when they click on the
    > link, they are taken to a place to type in a new password.
    >
    > Thanks in advance
    >
    > Danny
    >
    >
    Patrice, Jul 12, 2004
    #2
    1. Advertising

  3. Danny

    Ray at Guest

    Why would you do this via e-mail? Are you talking about a "I forgot my
    password" thing, or just "I know my password, but I'd like to change it?"

    Function Validate(CurrentPassword, NewPassword, NewPasswordConfirm)
    Dim aCurrentPassword

    '''first check current password is correct
    aCurrentPassword = GetRecordset("SELECT [Password] FROM [Users] WHERE
    [UserID]=" & iUserID)
    If IsEmpty(aCurrentPassword) Then
    Validate = 99
    Exit Function
    Else
    If aCurrentPassword(0,0) <> CurrentPassword Then Validate = 1 : Exit
    Function
    End If


    '''Check that new passwords match
    If NewPassword <> NewPasswordConfirm Then Validate = 11 : Exit Function

    '''Check min len
    If Len(NewPassword) < 4 Then Validate = 2 : Exit Function
    If Len(NewPassword) > 50 Then Validate = 3 : Exit Function

    '''If here, all is cool
    OpenData()
    oADO.Execute "UPDATE [Users] SET [Password]=" & TextIn(NewPassword,50)
    CloseData()
    Validate = 0
    End Function

    Ray at work

    "Danny" <> wrote in message
    news:ZCvIc.885$...
    > Hello
    > I am looking for an asp change password solution. I know there are very
    > efficient ways of doing it and perhaps you have some samples or ideas.
    >
    > Basically I would like the user to be able to change their password. Then
    > a
    > link is mailed to their email address on file and when they click on the
    > link, they are taken to a place to type in a new password.
    >
    > Thanks in advance
    >
    > Danny
    >
    >
    Ray at, Jul 12, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page