[CMF-checkins] CVS: Products/CMFCore - MembershipTool.py:1.13

Jens Vagelpohl jens@zope.com
Tue, 9 Oct 2001 17:36:20 -0400


Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv31453/CMFCore

Modified Files:
	MembershipTool.py 
Log Message:
Removed an infinite loop condition that arises when
createMemberArea gets called inside wrapUser (this could
only happen if "Create Member Area" was checked in the 
Membership tool.)



=== Products/CMFCore/MembershipTool.py 1.12 => 1.13 ===
         parent = self.aq_inner.aq_parent
         members =  getattr(parent, 'Members', None)
-        if members is not None:
+        user = self.acl_users.getUser( member_id ).__of__( self.acl_users )
+        
+        if members is not None and user is not None:
             f_title = "%s's Home" % member_id
             members.manage_addPortalFolder( id=member_id, title=f_title )
             f=getattr(members, member_id)
@@ -299,12 +301,6 @@
                                 ['Owner','Manager','Reviewer'], 0)
             f.manage_permission(CMFCorePermissions.AccessContentsInformation,
                                 ['Owner','Manager','Reviewer'], 0)  
-
-            member = self.getMemberById(member_id)
-            if hasattr(getattr(member, 'aq_base', member), 'getUser'):
-                user = member.getUser()
-            else:
-                user = member
 
             # Grant ownership to Member
             try: f.changeOwnership(user)