UserManager<TUser>.SetLockoutEnabledAsync(TUser, Boolean) Method

Definition

Sets a flag indicating whether the specified user is locked out, as an asynchronous operation.

public:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::IdentityResult ^> ^ SetLockoutEnabledAsync(TUser user, bool enabled);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> SetLockoutEnabledAsync (TUser user, bool enabled);
abstract member SetLockoutEnabledAsync : 'User * bool -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.SetLockoutEnabledAsync : 'User * bool -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function SetLockoutEnabledAsync (user As TUser, enabled As Boolean) As Task(Of IdentityResult)

Parameters

user
TUser

The user whose locked out status should be set.

enabled
Boolean

Flag indicating whether the user is locked out or not.

Returns

The Task that represents the asynchronous operation, the IdentityResult of the operation

Applies to