UserManager<TUser>.FindByEmailAsync(String) Method

Definition

Gets the user, if any, associated with the normalized value of the specified email address. Note: Its recommended that identityOptions.User.RequireUniqueEmail be set to true when using this method, otherwise the store may throw if there are users with duplicate emails.

C#
public virtual System.Threading.Tasks.Task<TUser> FindByEmailAsync (string email);
C#
public virtual System.Threading.Tasks.Task<TUser?> FindByEmailAsync (string email);

Parameters

email
String

The email address to return the user for.

Returns

Task<TUser>

The task object containing the results of the asynchronous lookup operation, the user, if any, associated with a normalized value of the specified email address.

Applies to

منتج الإصدارات
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0