summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2014-01-13 13:38:17 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2014-01-13 13:38:17 (GMT)
commit41f338aa43c5825495742b819d2131862d4bff1b (patch)
tree8ba100d1218110a480e7283059cc49cbd0c20327
parent75a17288cf1ab49b4fed6672277e22effeebac34 (diff)
downloadauthentic-old-41f338aa43c5825495742b819d2131862d4bff1b.zip
authentic-old-41f338aa43c5825495742b819d2131862d4bff1b.tar.gz
authentic-old-41f338aa43c5825495742b819d2131862d4bff1b.tar.bz2
root: request.user is just the id of the user not the object, use session.get_user_object() for that
-rw-r--r--authentic/root.ptl3
1 files changed, 2 insertions, 1 deletions
diff --git a/authentic/root.ptl b/authentic/root.ptl
index 99f2a79..21c7201 100644
--- a/authentic/root.ptl
+++ b/authentic/root.ptl
@@ -114,8 +114,9 @@ class RootDirectory(Directory):
else:
request.user = None
if request.user:
- preferred_language = request.user.get_preferred_language()
+ preferred_language = session.get_user_object().get_preferred_language()
if preferred_language:
+ print 'set preferred language to', preferred_language
request.language = preferred_language
get_publisher().install_lang(preferred_language)