diff --git a/Project-Unite/Controllers/AccountController.cs b/Project-Unite/Controllers/AccountController.cs index d742484..e23572d 100644 --- a/Project-Unite/Controllers/AccountController.cs +++ b/Project-Unite/Controllers/AccountController.cs @@ -190,7 +190,7 @@ public async Task Register(RegisterViewModel model) string code = await UserManager.GenerateEmailConfirmationTokenAsync(user.Id); 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 here"); - UserManager.AddToRole(user.Id, ACL.LowestPriorityRole().Id); + UserManager.AddToRole(user.Id, ACL.LowestPriorityRole().Name); return RedirectToAction("Index", "Home"); } AddErrors(result);