public ActionResult AcceptUser(string id) { ApplicationDbContext db = new ApplicationDbContext(); ApplicationUser user = db.Users.Find(id); IdentityManager im = new IdentityManager(); im.RemoveFromRole(user.Id, "Waiting"); im.AddUserToRoleByUsername(user.UserName, "User"); TempData["notice"] = "User accepted!"; return RedirectToAction("WaitingUsers"); }