SVN: CMF/branches/1.4/C CMFCore.MembershipTool: Don't attempt to create member areas for

"Stefan H. Holek" <[email protected]>
Newsgroups gmane.comp.web.zope.cmf.cvs
Message-ID <[email protected]>
Log message for revision 69380:
  CMFCore.MembershipTool: Don't attempt to create member areas for
  special users (users whose getId method returns None).
  

Changed:
  U   CMF/branches/1.4/CHANGES.txt
  U   CMF/branches/1.4/CMFCore/MembershipTool.py

-=-
Modified: CMF/branches/1.4/CHANGES.txt
===================================================================
--- CMF/branches/1.4/CHANGES.txt	2006-08-08 21:11:15 UTC (rev 69379)
+++ CMF/branches/1.4/CHANGES.txt	2006-08-09 09:45:21 UTC (rev 69380)
@@ -94,6 +94,9 @@
       Z28-incompatible borrowings of bound methods from base classes
       (http://www.zope.org/Collectors/CMF/321)
 
+    - CMFCore.MembershipTool: Don't attempt to create member areas for
+      special users (users whose getId method returns None).
+
   New Features
 
     - CMFCore.CachingPolicyManager:  Landed a number of changes pioneered

Modified: CMF/branches/1.4/CMFCore/MembershipTool.py
===================================================================
--- CMF/branches/1.4/CMFCore/MembershipTool.py	2006-08-08 21:11:15 UTC (rev 69379)
+++ CMF/branches/1.4/CMFCore/MembershipTool.py	2006-08-09 09:45:21 UTC (rev 69380)
@@ -144,8 +144,10 @@
                 # Check for the member area creation flag and
                 # take appropriate (non-) action
                 if getattr(self, 'memberareaCreationFlag', 0) != 0:
-                    if self.getHomeUrl(portal_user.getId()) is None:
-                        self.createMemberarea(portal_user.getId())
+                    member_id = portal_user.getId()
+                    if (member_id is not None and
+                        self.getHomeUrl(member_id) is None):
+                        self.createMemberarea(member_id)
 
                 return portal_user
             except ConflictError:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.