I have changed the RegisterViewModel to use Username instead of Email and omitted the email part when initialized new ApplicationUser in the Register POST method:
public async Task<ActionResult> Register(RegisterViewModel model)
{
if (ModelState.IsValid)
{
var user = new ApplicationUser { UserName = model.Username/*, Email = model.Username*/ };
...
But when I register by username I get the error:
Email cannot be null or empty.
How can I solve this, and is there a way to not allow identical usernames?