Reputation: 595
I am using the ChangePassword web control in order to change the user password. my provider is using hashed password, and I am want to keep using it. just wanted to know if there is a way to compare the current password the user entered with the old password in the DB.
Upvotes: 1
Views: 944
Reputation: 751
You can use Membership.ValidateUser method, that returns true or false, depending on whether the entered password - in your case the new password - is the same as the old password.
http://msdn.microsoft.com/en-us/library/system.web.security.membership.validateuser.aspx
Upvotes: 2
Reputation: 12705
hash the current password and compare it.. thats how it is ususally done
Upvotes: 0