System.Web.Security.SqlMembershipProvider.UnlockUser Method

Clears the user's locked-out status so that the membership user can be validated.

Syntax

public override bool UnlockUser (string username)

Parameters

username
The name of the membership user to clear the locked-out status for.

Returns

true if the membership user was successfully unlocked; otherwise, false. A value of false is also returned if the user does not exist in the database.

Remarks

Users are most commonly locked out and cannot be validated by the SqlMembershipProvider.ValidateUser(string, string) method when the SqlMembershipProvider.MaxInvalidPasswordAttempts is exceeded within the SqlMembershipProvider.PasswordAttemptWindow.

Leading and trailing spaces are trimmed from the username parameter value.

Requirements

Namespace: System.Web.Security
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0