Click or drag to resize
ApplicationUserStoreTUserIsInRoleAsync Method
Returns a flag indicating whether the specified user is a member of the given named role.

Namespace: Kentico.Membership
Assembly: Kentico.Membership (in Kentico.Membership.dll) Version: 13.0.131
Syntax
C#
public Task<bool> IsInRoleAsync(
	TUser user,
	string roleName,
	CancellationToken cancellationToken
)

Parameters

user
Type: TUser
The user whose role membership should be checked.
roleName
Type: SystemString
The name of the role to be checked.
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, containing a flag indicating whether the specified user is a member of the named role.

Implements

IUserRoleStore.IsInRoleAsync(UTP, String, CancellationToken)
Exceptions
ExceptionCondition
ArgumentNullExceptionuser is null.
See Also