public IActionResult ChangePassword(PassChangeVm passChangeVm) { if (ModelState.IsValid) { var userId = int.Parse(userInfoService.CurrentUser.Id); if (userInfoService.CheckPassword(passChangeVm.OldPassword, userId)) { // pot sa schimb parola userInfoService.ChangePassword(passChangeVm.NewPassword, userId); } } return(View("ChangePasswordPage", passChangeVm)); }
public IActionResult ChangePassword() { var model = new PassChangeVm(); return(View("ChangePasswordPage", model)); }