ApplicationUserStoreTUserFindByIdAsync Method (String, CancellationToken) |
Finds and returns a user, if any, who has the specified userId.
Namespace: Kentico.MembershipAssembly: Kentico.Membership (in Kentico.Membership.dll) Version: 13.0.131
Syntax public Task<TUser> FindByIdAsync(
string userId,
CancellationToken cancellationToken
)
Parameters
- userId
- Type: SystemString
The user ID to search for. - cancellationToken
- Type: System.ThreadingCancellationToken
The CancellationToken used to propagate notifications that the operation should be canceled.
Return Value
Type:
TaskTUser
The
TaskTResult that represents the asynchronous operation, containing the user matching the specified
userId if it exists.
Implements
IUserStore.FindByIdAsync(String, CancellationToken)Exceptions Exception | Condition |
---|
ArgumentException | userId is empty or non integer. |
See Also