Allow an admin to override a user's email address.

This commit is contained in:
Joseph Milazzo 2024-12-08 10:22:31 -06:00
parent 0407d75d91
commit d522bccf86
6 changed files with 112 additions and 80 deletions

View file

@ -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>