Fixed a bug where initial registration was still telling user email was required, when it wasn't.
This commit is contained in:
parent
6b7462a790
commit
ccee474b90
5 changed files with 58 additions and 35 deletions
|
|
@ -138,6 +138,12 @@ public class AccountController : BaseApiController
|
|||
return BadRequest(usernameValidation);
|
||||
}
|
||||
|
||||
// If Email is empty, default to the username
|
||||
if (string.IsNullOrEmpty(registerDto.Email))
|
||||
{
|
||||
registerDto.Email = registerDto.Username;
|
||||
}
|
||||
|
||||
var user = new AppUserBuilder(registerDto.Username, registerDto.Email,
|
||||
await _unitOfWork.SiteThemeRepository.GetDefaultTheme()).Build();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue