[Zope-CMF] renaming /Members

Troy Farrell troy@entheossoft.com
Fri, 24 Jan 2003 14:30:23 -0600


I'm looking at lines 193-220 of CMFDefault/MembershipTool.py (CMF 1.3).
Is the CMFDefault MembershipTool overridden in Plone?  (checking) Yes.

(The following paragraphs show the sad state of my Python skillz.)

Ready?  Here we go.  If you look at CMFPlone/MembershipTool.py (1.0 
RC1), you'll see many calls to a function called getHomeFolder, right? 
When you search for it, you'll find that it is never defined in this 
file.  That means it is inherited from the base class.  What is the base 
class?

class MembershipTool( BaseTool ):

I don't know what BaseTool is, but I searched for it:


from Products.CMFDefault.MembershipTool import MembershipTool as BaseTool

Oh.  Now were cooking.  Time to go to CMF Default (where I was before.) 
  Search for getHomeFolder, or just go to line 202:

         if hasattr(self, 'Members'):

Whaddya know.  A magic string :)  See if changing that fixes the 
problem.  You might also fix line 151 while you're there (you don't need 
to fix line 151, since Plone overrides that function.)

Troy

martin f krafft wrote:
> also sprach Bill Anderson <bill@libc.org> [2003.01.24.1640 +0100]:
> 
>>Look for the subject "Changing ID of members folder, and related
>>questions" in the archives.
> 
> 
> Okay, I found three MemberShip.py files, under CMFCore, CMFZope, and
> CMFPlone. I just changed all of them. There was only one reference in
> each, the other occurences of 'Members' were function names.
> 
> Now it looks good. However, it doesn't appear to be working fully yet.
> The automatic folder creation does its job, but an empty search in the
> Member Search Form (which would usually show all members) returns
> nothing, and in the grey bar underneath the portal_tabs, my name does
> not link to my member folder. I can access www.site.com/people/madduck
> though, so that's a start. Glancing at the code of portal_membership,
> however, does not indicate why the <a> tags are not shown around my
> name. The line
> 
>   tal:omit-tag="not: here/portal_membership/getHomeFolder"
> 
> in the <a> tag seems to evaluate to true, so thus <a> is omitted. But
> I can't figure out why.
> 
> Thanks for any pointers!
>