Uncomment check for session attribute in case of empty username redirect to forgotPassword page

This commit is contained in:
Sofia Baltzi 2018-03-08 14:41:15 +00:00
parent 11f4c9d8f3
commit 5126975df8
2 changed files with 5 additions and 6 deletions

View File

@ -91,7 +91,7 @@ public class RegisterServlet extends HttpServlet {
} else {
resultPath = scheme + "://" +serverName + ":" +portNumber + contextPath + "/activate.jsp";
}
String verificationCodeMsg = "<p>Hello " + username + ",</p>" +
"<p> A request has been made to verify your email and activate your OpenAIRE account. To activate your " +
"account, you will need to submit your username and this activation code in order to verify that the" +

View File

@ -8,11 +8,10 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%--<% if (session.getAttribute("username") == null) {--%>
<%--String redirectURL = "/dnet-openaire-users-1.0.0-SNAPSHOT/forgotPassword.jsp";--%>
<%--response.sendRedirect(redirectURL);--%>
<%--}--%>
<%--%>--%>
<% if (session.getAttribute("username") == null) {
String redirectURL = "/dnet-openaire-users-1.0.0-SNAPSHOT/forgotPassword.jsp";
response.sendRedirect(redirectURL);
}%>
<%--<%String name=(String)request.getAttribute("name");--%>
<%--out.print("your name"+name);%>--%>
<html lang="en-gb" dir="ltr" vocab="http://schema.org/">