diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-06-04 11:26:34 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-06-04 11:30:56 -0700 |
commit | 8ce8faaf5d302574cb0144cc683470a940119a46 (patch) | |
tree | f9d8fa988816141906ceebafc8164a4499cbe499 /mediagoblin/auth | |
parent | 1bce0c15ba97995ba7772296ab698b36a7dc41ca (diff) | |
download | mediagoblin-8ce8faaf5d302574cb0144cc683470a940119a46.tar.lz mediagoblin-8ce8faaf5d302574cb0144cc683470a940119a46.tar.xz mediagoblin-8ce8faaf5d302574cb0144cc683470a940119a46.zip |
fixed a bug that was deleting the messages
Diffstat (limited to 'mediagoblin/auth')
-rw-r--r-- | mediagoblin/auth/tools.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mediagoblin/auth/tools.py b/mediagoblin/auth/tools.py index 22da54d0..ae0b79da 100644 --- a/mediagoblin/auth/tools.py +++ b/mediagoblin/auth/tools.py @@ -202,6 +202,7 @@ def check_auth_enabled(): def no_auth_logout(request): - """Log out the user if in no_auth mode""" - if not mg_globals.app.auth: - request.session.delete() + """Log out the user if in no_auth mode, but don't delete the messages""" + if not mg_globals.app.auth and 'user_id' in request.session: + del request.session['user_id'] + request.session.save() |