Commit 294a825e authored by michael.simon's avatar michael.simon
Browse files

reset original request path after login and user create

parent a0f239a6
......@@ -175,6 +175,8 @@ public class RegisterUserBean implements Serializable {
sessionManager.setUserId(entity.getId());
if (sessionManager.getOriginalRequestPath() != null) {
sessionManager.setOriginalRequestPath(null);
ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
try {
externalContext.redirect(sessionManager.getOriginalRequestPath());
......
......@@ -156,8 +156,10 @@ public class Saml2PostHandler {
session.setTheme(user.getTheme());
session.setLocale(user.getLocale());
if (session.getOriginalRequestPath() != null)
if (session.getOriginalRequestPath() != null) {
session.setOriginalRequestPath(null);
response.sendRedirect(session.getOriginalRequestPath());
}
else
response.sendRedirect("/index.xhtml");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment