Allow an admin to override a user's email address.
This commit is contained in:
parent
0407d75d91
commit
d522bccf86
6 changed files with 112 additions and 80 deletions
|
|
@ -95,12 +95,12 @@ public class AccountService : IAccountService
|
|||
public async Task<IEnumerable<ApiException>> ValidateEmail(string email)
|
||||
{
|
||||
var user = await _unitOfWork.UserRepository.GetUserByEmailAsync(email);
|
||||
if (user == null) return Array.Empty<ApiException>();
|
||||
if (user == null) return [];
|
||||
|
||||
return new List<ApiException>()
|
||||
{
|
||||
return
|
||||
[
|
||||
new ApiException(400, "Email is already registered")
|
||||
};
|
||||
];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue