log.debug("Processing Password Hint...");
}
// look up the user's information
try {
User user = userManager.getUserByUsername(username);
StringBuilder msg = new StringBuilder();
msg.append("Your password hint is: ").append(user.getPasswordHint());
msg.append("\n\nLogin at: ").append(RequestUtil.getAppURL(getRequest()));
message.setTo(user.getEmail());
String subject = '[' + getText("webapp.name") + "] " + getText("user.passwordHint");
message.setSubject(subject);
message.setText(msg.toString());
mailEngine.send(message);
addMessage("login.passwordHint.sent",
new Object[] { username, user.getEmail() });
} catch (UsernameNotFoundException e) {
log.warn(e.getMessage());
// If exception is expected do not rethrow
addError("login.passwordHint.error", username);