UnlockUser Method
Clears a lock so that the membership user can be validated.
Namespace: Microsoft.CommerceServer.Runtime.Profiles
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public Overrides Function UnlockUser ( _
username As String _
) As Boolean
'Usage
Dim instance As UpmMembershipProvider
Dim username As String
Dim returnValue As Boolean
returnValue = instance.UnlockUser(username)
public override bool UnlockUser(
string username
)
public:
virtual bool UnlockUser(
String^ username
) override
public override function UnlockUser(
username : String
) : boolean
Parameters
- username
Type: System..::.String
The user to unlock.
Return Value
Type: System..::.Boolean
true if the membership user was successfully unlocked; otherwise false.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | username is nullNothingnullptra null reference (Nothing in Visual Basic) or is an empty string. |
ArgumentException | There are invalid characters inside username. |
Remarks
Users are most commonly locked out and cannot be validated by the ValidateUser method when the MaxInvalidPasswordAttempts property is exceeded within the time specified in the PasswordAttemptWindow property of when too many attempts have been made to log on using the wrong password.
Returns false if the membership user is not found in the data store.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.