Click or drag to resize
ApplicationUserStoreTUserHasPasswordAsync Method
Gets a flag indicating whether the specified user has a password.

Namespace: Kentico.Membership
Assembly: Kentico.Membership (in Kentico.Membership.dll) Version: 13.0.131
Syntax
C#
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
ExceptionCondition
ArgumentNullExceptionuser is null.
InvalidOperationExceptionThrown when the user is not found.
See Also