From 8ce8faaf5d302574cb0144cc683470a940119a46 Mon Sep 17 00:00:00 2001 From: Rodney Ewing Date: Tue, 4 Jun 2013 11:26:34 -0700 Subject: fixed a bug that was deleting the messages --- mediagoblin/auth/tools.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mediagoblin/auth') 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() -- cgit v1.2.3