public ActionResult ListPendingUsers() { var model = new ListUsersByRoleViewModel { PendingUsers = roleManager.GetUsersByRole("pending"), ActiveUsers = roleManager.GetUsersByRole("user") }; return(View(model)); }
public ActionResult Search() { ApplicationDbContext db = new ApplicationDbContext(); var model = new ListUsersByRoleViewModel { ActiveUsers = new List <ApplicationUser>() }; var currUser = User.Identity.GetUserId(); model.ActiveUsers = db.Users.Where(u => u.Id != currUser).ToList(); return(View(model)); }