}
@End
public String requestReset() {
account = accountDAO.getByUsernameAndEmail(username, email);
HAccountResetPasswordKey key =
userAccountServiceImpl.requestPasswordReset(account);
if (key == null) {
FacesMessages.instance().add("No such account found");
return null;
} else {
String message =
emailServiceImpl.sendPasswordResetEmail(account.getPerson(),
key.getKeyHash());
FacesMessages.instance().add(message);
return "/home.xhtml";
}
}