UserManager<TUser>.SetLockoutEnabledAsync(TUser, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for