changeset 4534:0b176807b07c

bugfix: create dummy user obj at the right place
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 03 Feb 2009 05:38:44 +0100
parents 58ceb1d1c38d
children 0cac33a38cb9
files MoinMoin/wsgiapp.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/wsgiapp.py	Tue Feb 03 03:10:44 2009 +0100
+++ b/MoinMoin/wsgiapp.py	Tue Feb 03 05:38:44 2009 +0100
@@ -179,8 +179,6 @@
     userobj = auth.setup_from_session(context, session)
     userobj, olduser = auth.setup_setuid(context, userobj)
     context._setuid_real_user = olduser
-    if not userobj:
-        userobj = user.User(context, auth_method='invalid')
 
     # then handle login/logout forms
     form = context.request.values
@@ -199,6 +197,10 @@
     else:
         userobj = auth.handle_request(context, userobj)
 
+    # if we still have no user obj, create a dummy:
+    if not userobj:
+        userobj = user.User(context, auth_method='invalid')
+
     return userobj
 
 def setup_i18n_preauth(context):