Share via


UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>.SetLockoutEnabledAsync Method (TUser, Boolean)

 

Asynchronously sets whether the user can be locked out.

Namespace:   Microsoft.AspNet.Identity.EntityFramework
Assembly:  Microsoft.AspNet.Identity.EntityFramework (in Microsoft.AspNet.Identity.EntityFramework.dll)

Syntax

public virtual Task SetLockoutEnabledAsync(
    TUser user,
    bool enabled
)
public:
virtual Task^ SetLockoutEnabledAsync(
    TUser user,
    bool enabled
)
abstract SetLockoutEnabledAsync : 
        user:'TUser *
        enabled:bool -> Task
override SetLockoutEnabledAsync : 
        user:'TUser *
        enabled:bool -> Task
Public Overridable Function SetLockoutEnabledAsync (
    user As TUser,
    enabled As Boolean
) As Task

Parameters

  • user
    Type: TUser

    The user.

  • enabled
    Type: System.Boolean

    true to enable lockout; otherwise, false.

Return Value

Type: System.Threading.Tasks.Task

The task representing the asynchronous operation.

Implements

IUserLockoutStore<TUser, TKey>.SetLockoutEnabledAsync(TUser, Boolean)

See Also

UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> Class
Microsoft.AspNet.Identity.EntityFramework Namespace
ASP.NET Identity

Return to top