public IActionResult ChangePassword(AppUserPasswordDto model) { TempData["active"] = "sifre"; if (ModelState.IsValid) { var updatedUser = appUserService.FindByName(User.Identity.Name); updatedUser.Password = model.Password; appUserService.Update(updatedUser); HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme); } return(View(model)); }
public IActionResult ChangePassword(AppUserPasswordDto model) { TempData["Active"] = "sifre"; if (ModelState.IsValid) { var updatedUser = _appUserService.GetById(model.Id); updatedUser.Password = model.Password; _appUserService.Update(updatedUser); HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme); TempData["Message"] = "İşleminiz başarı ile gerçekleşti"; } return(View(model)); }