Fix registration bug.

This commit is contained in:
Michael 2017-03-21 12:54:00 -04:00
parent 6fc0e6fa29
commit 32d02caddf

View file

@ -190,7 +190,7 @@ public async Task<ActionResult> Register(RegisterViewModel model)
string code = await UserManager.GenerateEmailConfirmationTokenAsync(user.Id); string code = await UserManager.GenerateEmailConfirmationTokenAsync(user.Id);
var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: Request.Url.Scheme); var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: Request.Url.Scheme);
await UserManager.SendEmailAsync(user.Id, "Confirm your account", "Please confirm your account by clicking <a href=\"" + callbackUrl + "\">here</a>"); await UserManager.SendEmailAsync(user.Id, "Confirm your account", "Please confirm your account by clicking <a href=\"" + callbackUrl + "\">here</a>");
UserManager.AddToRole(user.Id, ACL.LowestPriorityRole().Id); UserManager.AddToRole(user.Id, ACL.LowestPriorityRole().Name);
return RedirectToAction("Index", "Home"); return RedirectToAction("Index", "Home");
} }
AddErrors(result); AddErrors(result);