Beispiel #1
0
        public ActionResult DeleteUsersSoft(List <string> UsersToDelete, int vanaf, int desc, int?filter)
        {
            if (!User.IsInRole("SuperAdministrator") && !User.IsInRole("Administrator"))
            {
                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.DeleteUserSoft(u);
            }
            return(RedirectToAction("Activities", new { vanaf = vanaf, desc = desc, filter = filter }));
        }