This commit is contained in:
parent
32bd5d6ee6
commit
9e5bcb8501
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ namespace API.Controllers
|
|||
[HttpPost("register")]
|
||||
public async Task<ActionResult<UserDto>> Register(RegisterDto registerDto)
|
||||
{
|
||||
if (await _userManager.Users.AnyAsync(x => x.UserName == registerDto.Username))
|
||||
if (await _userManager.Users.AnyAsync(x => x.NormalizedUserName == registerDto.Username.ToUpper()))
|
||||
{
|
||||
return BadRequest("Username is taken.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue