looking for a 'change password' solution

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Danny

    looking for a 'change password' solution

    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

    #2
    Re: looking for a 'change password' solution

    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" <dannywork5@hot mail.com> a écrit dans le message de
    news:ZCvIc.885$ _b.2253714@news 4.srv.hcvlny.cv .net...[color=blue]
    > 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[/color]
    a[color=blue]
    > 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
    >
    >[/color]


    Comment

    • Ray at

      #3
      Re: looking for a 'change password' solution

      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(Curren tPassword, NewPassword, NewPasswordConf irm)
      Dim aCurrentPasswor d

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


      '''Check that new passwords match
      If NewPassword <> NewPasswordConf irm 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(NewPassw ord,50)
      CloseData()
      Validate = 0
      End Function

      Ray at work

      "Danny" <dannywork5@hot mail.com> wrote in message
      news:ZCvIc.885$ _b.2253714@news 4.srv.hcvlny.cv .net...[color=blue]
      > 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
      >
      >[/color]


      Comment

      Working...