looking for a 'change password' solution

D

Danny

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
 
P

Patrice

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
 
R

Ray at

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top