Exemplo n.º 1
0
        public ActionResult DeleteUsersHard(List <string> UsersToDelete, int vanaf, int desc, int?filter)
        {
            if (!User.IsInRole("SuperAdministrator"))
            {
                return(RedirectToAction("Users"));
            }

            //TODO: ervoor zorgen dat lege gebruiker ook kan verwijderd worden.
            foreach (string UserId in UsersToDelete)
            {
                ApplicationUser u = bs.GetUserById(UserId);
                if (u == null)
                {
                    continue;
                }
                bs.DeleteUserHard(u);
            }
            return(RedirectToAction("Activities", new { vanaf = vanaf, desc = desc, filter = filter }));
        }