log.debug("Processing Password Hint...");
// look up the user's information
try {
User user = userManager.getUserByUsername(username);
StringBuffer msg = new StringBuffer();
msg.append("Your password hint is: ").append(user.getPasswordHint());
msg.append("\n\nLogin at: ").append(RequestUtil.getAppURL(request));
message.setTo(user.getEmail());
String subject = '[' + text.getMessage("webapp.name") + "] " +
text.getMessage("user.passwordHint");
message.setSubject(subject);
message.setText(msg.toString());
mailEngine.send(message);
saveMessage(request, text.getMessage("login.passwordHint.sent", new Object[] { username, user.getEmail() }));
} catch (UsernameNotFoundException e) {
log.warn(e.getMessage());
saveError(request, text.getMessage("login.passwordHint.error", new Object[] { username }));
} catch (MailException me) {
log.warn(me.getMessage());