log.debug("Processing Password Hint...");
}
// look up the user's information
try {
User user = userManager.getUserByUsername(username);
String hint = user.getPasswordHint();
if (hint == null || hint.trim().equals("")) {
log.warn("User '" + username + "' found, but no password hint exists.");
addActionError(getText("login.passwordHint.missing"));
return INPUT;
}
StringBuffer msg = new StringBuffer();
msg.append("Your password hint is: ").append(hint);
msg.append("\n\nLogin at: ").append(RequestUtil.getAppURL(getRequest()));
mailMessage.setTo(user.getEmail());
String subject = '[' + getText("webapp.name") + "] " + getText("user.passwordHint");
mailMessage.setSubject(subject);
mailMessage.setText(msg.toString());
mailEngine.send(mailMessage);
args.add(username);
args.add(user.getEmail());
saveMessage(getText("login.passwordHint.sent", args));
} catch (UsernameNotFoundException e) {
log.warn(e.getMessage());
args.add(username);