Ejemplo n.º 1
0
 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));
 }