ApplicationUserStoreTUserHasPasswordAsync Method |
Gets a flag indicating whether the specified user has a password.
Namespace: Kentico.MembershipAssembly: Kentico.Membership (in Kentico.Membership.dll) Version: 13.0.131
Syntax public Task<bool> HasPasswordAsync(
TUser user,
CancellationToken cancellationToken
)
Parameters
- user
- Type: TUser
The user to return a flag for, indicating whether they have a password or not. - cancellationToken
- Type: System.ThreadingCancellationToken
The CancellationToken used to propagate notifications that the operation should be canceled.
Return Value
Type:
TaskBoolean
The
TaskTResult that represents the asynchronous operation, returning
true if the specified
user has a password;
otherwise
false.
Implements
IUserPasswordStore.HasPasswordAsync(UTP, CancellationToken)Exceptions Exception | Condition |
---|
ArgumentNullException | user is null. |
InvalidOperationException | Thrown when the user is not found. |
See Also