Bewerken

Share via


MembershipProvider.ChangePassword(String, String, String) Method

Definition

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.

Applies to

See also