From: David ‘Bombe’ Roden Date: Wed, 25 Jul 2012 19:05:01 +0000 (+0200) Subject: Get current user from session correctly. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=037c1657a928b5cb1ef6ae05f7feafaff4095cbe;p=demoscenemusic.git Get current user from session correctly. --- diff --git a/src/main/java/net/pterodactylus/demoscenemusic/page/BasePage.java b/src/main/java/net/pterodactylus/demoscenemusic/page/BasePage.java index 88f5fc7..c24e6af 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/page/BasePage.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/page/BasePage.java @@ -57,7 +57,7 @@ public class BasePage extends TemplatePage { @Override protected void processTemplate(TemplateContext templateContext, ServletRequest request) throws RedirectException { super.processTemplate(templateContext, request); - templateContext.set("currentUser", request.getServletRequest().getAttribute("currentUser")); + templateContext.set("currentUser", request.getServletRequest().getSession().getAttribute("currentUser")); } }