changeset 244:42f749b0d8bb

fix empty username when using auth_username for autocreation imported from: moin--main--1.5--patch-247
author Thomas Waldmann <tw@waldmann-edv.de>
date Sun, 27 Nov 2005 12:22:53 +0000
parents d6a31875fae9
children 9ed4223a2d7f
files MoinMoin/user.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/user.py	Sun Nov 27 12:16:18 2005 +0000
+++ b/MoinMoin/user.py	Sun Nov 27 12:22:53 2005 +0000
@@ -191,9 +191,8 @@
 class User:
     """A MoinMoin User"""
 
-    def __init__(self, request, id=None, name="", password=None,
-                 auth_username=""):
-        """ Initialize user object
+    def __init__(self, request, id=None, name="", password=None, auth_username=""):
+        """ Initialize User object
         
         @param request: the request object
         @param id: (optional) user ID
@@ -216,7 +215,9 @@
        
         if name:
             self.name = name
-        
+        elif auth_username: # this is needed for user_autocreate
+            self.name = auth_username
+            
         # create checkbox fields (with default 0)
         for key, label in self._cfg.user_checkbox_fields:
             setattr(self, key, self._cfg.user_checkbox_defaults.get(key, 0))