diff --git a/src/main/java/eu/dnetlib/openaire/usermanagement/ForgotPasswordServlet.java b/src/main/java/eu/dnetlib/openaire/usermanagement/ForgotPasswordServlet.java index b475d58..2ef9d23 100644 --- a/src/main/java/eu/dnetlib/openaire/usermanagement/ForgotPasswordServlet.java +++ b/src/main/java/eu/dnetlib/openaire/usermanagement/ForgotPasswordServlet.java @@ -87,8 +87,7 @@ public class ForgotPasswordServlet extends HttpServlet { } } catch (LDAPException ldape) { - //TODO create error page - logger.error("LDAP error" + ldape); + logger.error("LDAP error", ldape); response.sendRedirect("./error.jsp"); } catch (MessagingException e) { diff --git a/src/main/java/eu/dnetlib/openaire/usermanagement/RemindUsernameServlet.java b/src/main/java/eu/dnetlib/openaire/usermanagement/RemindUsernameServlet.java index 3d062fc..436c2df 100644 --- a/src/main/java/eu/dnetlib/openaire/usermanagement/RemindUsernameServlet.java +++ b/src/main/java/eu/dnetlib/openaire/usermanagement/RemindUsernameServlet.java @@ -55,9 +55,7 @@ public class RemindUsernameServlet extends HttpServlet { String verificationCodeSubject = "Your OpenAIRE username"; - - emailSender.sendEmail(formEmail, verificationCodeSubject, verificationCodeMsg); - + emailSender.sendEmail(formEmail, verificationCodeSubject, verificationCodeMsg); } else { request.getSession().setAttribute("message", "User not found"); diff --git a/src/main/java/eu/dnetlib/openaire/usermanagement/VerificationCodeServlet.java b/src/main/java/eu/dnetlib/openaire/usermanagement/VerificationCodeServlet.java index e2cb989..9a28436 100644 --- a/src/main/java/eu/dnetlib/openaire/usermanagement/VerificationCodeServlet.java +++ b/src/main/java/eu/dnetlib/openaire/usermanagement/VerificationCodeServlet.java @@ -48,6 +48,8 @@ public class VerificationCodeServlet extends HttpServlet { printWriter.close(); } else { + request.getSession().setAttribute("message", "Username or verification code are not valid."); + response.sendRedirect("./verify.jsp"); // response.sendRedirect("./error.jsp"); or write a message in the session }