UserManager<TUser, TKey>.SetLockoutEnabledAsync Method (TKey, Boolean)
Sets whether lockout is enabled for this user.
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
Syntax
public virtual Task<IdentityResult> SetLockoutEnabledAsync(
TKey userId,
bool enabled
)
public:
virtual Task<IdentityResult^>^ SetLockoutEnabledAsync(
TKey userId,
bool enabled
)
abstract SetLockoutEnabledAsync :
userId:'TKey *
enabled:bool -> Task<IdentityResult>
override SetLockoutEnabledAsync :
userId:'TKey *
enabled:bool -> Task<IdentityResult>
Public Overridable Function SetLockoutEnabledAsync (
userId As TKey,
enabled As Boolean
) As Task(Of IdentityResult)
Parameters
userId
Type: TKeyThe user ID.
enabled
Type: System.Booleantrue to enable lockout; otherwise, false.
Return Value
Type: System.Threading.Tasks.Task<IdentityResult>
The task representing the asynchronous operation.
See Also
UserManager<TUser, TKey> Class
Microsoft.AspNet.Identity Namespace
ASP.NET Identity
Return to top