MembershipProvider.ChangePassword(String, String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Processes a request to update the password for a membership user.
public:
abstract bool ChangePassword(System::String ^ username, System::String ^ oldPassword, System::String ^ newPassword);
public abstract bool ChangePassword (string username, string oldPassword, string newPassword);
abstract member ChangePassword : string * string * string -> bool
Public MustOverride Function ChangePassword (username As String, oldPassword As String, newPassword As String) As Boolean
Parameters
- username
- String
The user to update the password for.
- oldPassword
- String
The current password for the specified user.
- newPassword
- String
The new password for the specified user.
Returns
true
if the password was updated successfully; otherwise, false
.
Examples
For an example of a MembershipProvider implementation, see Implementing a Profile Provider.
Remarks
Takes, as input, a user name, a current password, and a new password, and updates the password in the data source if the supplied user name and current password are valid.