[Zope-CMF] Get portal_memberdata's properties in singular way

Dieter Maurer dieter@handshake.de
Fri, 22 Nov 2002 19:48:06 +0100


Pascal Samuzeau writes:
 > I have a CMF's product.                                               
 >                                                                       
 > In his __init__'s fonction, I need to get the portal_memberdata's     
 > properties.                                                           
This will be at least difficult...

Move what you want to do with "portal_memberdata" in "__init__"
to "manage_afterAdd". This method is called after the objects
has been placed into the Zope hierarchy. Then, you can use
acquisition to access "portal_memberdata".

An alternative is to pass in an object from the Zope hierarchy
into your "__init__" as a parameter. Then you can find
"portal_memberdata" via this object.


Dieter