@CommitAfter public Object onSuccessFromPasswordForm() throws IOException, HornetQException { user.createPassword(newPassword); passwordChanged = true; emailNotify.startMessage(EmailTemplate.USER_CHANGE_PASSWORD); emailNotify.setToAddress(userEmailAddressDAO.getPrimaryEmail(user).getEmail()); emailNotify.send(); return this; }
private void validateCurrentPassword() throws NoSaltException { if (!user.matchPassword(currentPassword)) passwordForm.recordError(currentPasswordField, "Incorrect password"); }