示例#1
0
  public void onValidateFromPasswordForm() throws NoSaltException {
    if (currentPassword != null) validateCurrentPassword();

    if (newPassword != null && confirmPassword != null && !newPassword.equals(confirmPassword))
      passwordForm.recordError(confirmPasswordField, "Passwords do not match");
  }
示例#2
0
 private void validateCurrentPassword() throws NoSaltException {
   if (!user.matchPassword(currentPassword))
     passwordForm.recordError(currentPasswordField, "Incorrect password");
 }