Get current user from session correctly.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 25 Jul 2012 19:05:01 +0000 (21:05 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 25 Jul 2012 19:05:01 +0000 (21:05 +0200)
src/main/java/net/pterodactylus/demoscenemusic/page/BasePage.java

index 88f5fc7..c24e6af 100644 (file)
@@ -57,7 +57,7 @@ public class BasePage extends TemplatePage<ServletRequest> {
        @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"));
        }
 
 }