Get a user by email address
Description
TheĀ GetByEmail() method is used to get a user by email associated with the user.
Package Details
Interface
IUserManager
Syntax
await _userManager.GetByEmail(User user)
Returns
Task<ICollection<User>>
API
GET
/api/v1/users/emails?email={email}
Parameters
Parameter | Description | Parameter Type |
---|---|---|
The email address of the user to be fetched | Query string |
Returns
On success, 200 Ok
If UserManage.GetByEmail() returns null, 422 Unprocessable Entity
On error, 400 Bad Request
On authorization error, 403 Forbidden
Example
string emailAddress = "domain@domain.com"; await _userManager.GetByEmail(emailAddress);