request.urlgen = build_proxy
- mg_request.setup_user_in_request(request)
-
# Log user out if in no_auth mode
no_auth_logout(request)
+ mg_request.setup_user_in_request(request)
+
request.controller_name = None
try:
found_rule, url_values = map_adapter.match(return_rule=True)
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()