Esempio n. 1
0
        public async Task <IHttpActionResult> DeleteUsers([FromBody] DeleteUsersModel model)
        {
            foreach (var userId in model.UsersIds)
            {
                await _securityServiceAsync.RemoveUserAsync(await _securityServiceAsync.GetUserByIdAsync(userId), model.RemoveOwnData);
            }

            return(Ok());
        }
        public async Task <ActionResult> Remove(bool removeOwnData)
        {
            await
            _securityService.RemoveUserAsync(
                await _securityService.GetUserByIdAsync(User.Identity.GetUserId <string>()), removeOwnData);

            AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie);
            return(RedirectToAction("Index", "Home"));
        }