Example #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));
 }
Example #2
0
        public IActionResult ChangePassword()
        {
            var model = new PassChangeVm();

            return(View("ChangePasswordPage", model));
        }