MembershipProvider.UnlockUser(String) 方法

定义

清除锁定,以便验证成员资格用户。Clears a lock so that the membership user can be validated.

public:
 abstract bool UnlockUser(System::String ^ userName);
public abstract bool UnlockUser (string userName);
abstract member UnlockUser : string -> bool
Public MustOverride Function UnlockUser (userName As String) As Boolean

参数

userName
String

要清除其锁定状态的成员资格用户。The membership user whose lock status you want to clear.

返回

Boolean

如果成功取消成员资格用户的锁定,则为 true;否则为 falsetrue if the membership user was successfully unlocked; otherwise, false.

示例

有关实现的示例 MembershipProvider ,请参阅 实现配置文件提供程序For an example of a MembershipProvider implementation, see Implementing a Profile Provider.

注解

采用作为输入的用户名,并更新将属性存储到的数据源中的字段 IsLockedOut falseTakes, as input, a user name, and updates the field in the data source that stores the IsLockedOut property to false. UnlockUser true 如果成功更新成员资格用户的记录,则该方法返回; 否则返回 falseThe UnlockUser method returns true if the record for the membership user is updated successfully; otherwise, false.

适用于