use of net.jforum.util.mail.LostPasswordSpammer in project jforum2 by rafaelsteil.
the class UserAction method lostPasswordSend.
// Send lost password email
public void lostPasswordSend() {
String email = this.request.getParameter("email");
String username = this.request.getParameter("username");
User user = this.prepareLostPassword(username, email);
if (user == null) {
// user could not be found
this.context.put("message", I18n.getMessage("PasswordRecovery.invalidUserEmail"));
this.lostPassword();
return;
}
Executor.execute(new EmailSenderTask(new LostPasswordSpammer(user, SystemGlobals.getValue(ConfigKeys.MAIL_LOST_PASSWORD_SUBJECT))));
this.setTemplateName(TemplateKeys.USER_LOSTPASSWORD_SEND);
this.context.put("message", I18n.getMessage("PasswordRecovery.emailSent", new String[] { this.request.getContextPath() + "/user/login" + SystemGlobals.getValue(ConfigKeys.SERVLET_EXTENSION) }));
}
Aggregations