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.

返回

如果成功取消成员资格用户的锁定,则为 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属性存储到false的数据源中的字段。Takes, as input, a user name, and updates the field in the data source that stores the IsLockedOut property to false. 如果UnlockUser成功更新true成员资格用户的记录, false则该方法返回; 否则返回。The UnlockUser method returns true if the record for the membership user is updated successfully; otherwise, false.

适用于

另请参阅