public ShortUserDetails GetUserShortDetailById(string userId)
        {
            var user = this.Context.Users.Find(userId);

            ShortUserDetails vm = Mapper.Map <ApplicationUser, ShortUserDetails>(user);

            return(vm);
        }
Example #2
0
        public ActionResult UnBan(string userId)
        {
            if (!this.service.UserExists(userId))
            {
                return(this.HttpNotFound("User not Found"));
            }

            ShortUserDetails vm = this.service.GetUserShortDetailById(userId);

            return(this.View("UnBanConfirmation", vm));
        }
Example #3
0
        public ActionResult UnBanPost(string userId)
        {
            if (!this.service.UserExists(userId))
            {
                return(this.HttpNotFound("User not Found"));
            }

            ShortUserDetails vm = this.service.GetUserShortDetailById(userId);

            this.service.UnBanUser(userId);

            return(this.RedirectToAction("Users"));
        }