MembershipProvider.ChangePasswordQuestionAndAnswer 方法

定义

处理更新成员资格用户的密码提示问题和答案的请求。

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

参数

username
String

要为其更改密码提示问题和答案的用户。

password
String

指定的用户的密码。

newPasswordQuestion
String

指定的用户的新密码提示问题。

newPasswordAnswer
String

指定的用户的新密码提示问题答案。

返回

Boolean

如果成功更新密码提示问题和答案,则为 true;否则为 false

示例

有关实现的示例 MembershipProvider ,请参阅 实现配置文件提供程序

注解

如果提供的用户名和密码有效,将作为输入、用户名、密码、密码问题和密码答案,并更新数据源中的密码提示问题和答案。

如果提供的用户名和密码无效, false 则返回。

适用于

另请参阅