Bewerken

Delen via


MembershipProvider.ChangePasswordQuestionAndAnswer Method

Definition

Processes a request to update the password question and answer for a membership user.

public:
 abstract bool ChangePasswordQuestionAndAnswer(System::String ^ username, System::String ^ password, System::String ^ newPasswordQuestion, System::String ^ newPasswordAnswer);
public abstract bool ChangePasswordQuestionAndAnswer (string username, string password, string newPasswordQuestion, string newPasswordAnswer);
abstract member ChangePasswordQuestionAndAnswer : string * string * string * string -> bool
Public MustOverride Function ChangePasswordQuestionAndAnswer (username As String, password As String, newPasswordQuestion As String, newPasswordAnswer As String) As Boolean

Parameters

username
String

The user to change the password question and answer for.

password
String

The password for the specified user.

newPasswordQuestion
String

The new password question for the specified user.

newPasswordAnswer
String

The new password answer for the specified user.

Returns

true if the password question and answer are 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 password, a password question and a password answer, and updates the password question and answer in the data source if the supplied user name and password are valid.

If the supplied user name and password are not valid, false is returned.

Applies to

See also