Base solution for your next web application
Open Closed

Reset Password Form error. #3519


User avatar
0
velu created
  1. When I use UserFriendlyException In AccountController.cs (Reset Password ActionResult) is shows error instead of Popup.

Please suggest me necessary changes for this bug.

[https://drive.google.com/file/d/0BzSirtYGe7EHU0Z4bFEtZkV2RGs/view?usp=sharing])

var user = await _userManager.GetUserByIdAsync(userId);
            if (user == null || user.PasswordResetCode.IsNullOrEmpty() || user.PasswordResetCode != model.ResetCode)
            {
          Error --->      throw new UserFriendlyException(L("InvalidPasswordResetCode"), L("InvalidPasswordResetCode_Detail"));
            }

            //Check Password History
            var passwordHistory = await _PassWordHistoryRepository.CheckLastPassword(model.Password, tenantId , userId);
            if (passwordHistory.Isexist)
            {
               Error --->   throw new UserFriendlyException("Your password is matching with \n the last " + passwordHistory.controlValue + " history password.");
            }

1 Answer(s)