Dela via


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

Definition

Sets a flag indicating whether the specified user can be 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 can be locked out or not.

Returns

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

Applies to