UserManager<TUser, TKey>.SetLockoutEnabledAsync Method
Sets whether lockout is enabled for this user.
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
'Declaration
Public Overridable Function SetLockoutEnabledAsync ( _
userId As TKey, _
enabled As Boolean _
) As Task(Of IdentityResult)
'Usage
Dim instance As UserManager
Dim userId As TKey
Dim enabled As Boolean
Dim returnValue As Task(Of IdentityResult)
returnValue = instance.SetLockoutEnabledAsync(userId, _
enabled)
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 function SetLockoutEnabledAsync(
userId : TKey,
enabled : boolean
) : Task<IdentityResult>
- userId
Type: TKey
The user ID.
- enabled
Type: System.Boolean
true to enable lockout; otherwise, false.
Type: System.Threading.Tasks.Task<IdentityResult>
The task representing the asynchronous operation.
UserManager<TUser, TKey> Class