Esempio n. 1
0
  @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;
  }
Esempio n. 2
0
 private void validateCurrentPassword() throws NoSaltException {
   if (!user.matchPassword(currentPassword))
     passwordForm.recordError(currentPasswordField, "Incorrect password");
 }