[Zope-CMF] Store development with CMF (new guy)

Shane Hathaway shane@zope.com
Tue, 27 May 2003 17:38:19 -0400


sean.upton@uniontrib.com wrote:
> Shane writes:
> 
>>I'm sorry to hear that so many applications are broken.  CMF product 
>>authors: do not rely on portal_memberdata.  Assume it does not exist.
> 
> A bit confused: Is that to say that applications shouldn't use
> portal_memberdata at all, or that applications should be robust in the
> condition where portal_memberdata doesn't exist?

Both.  No application should access portal_memberdata; that is a detail 
private to portal_membership.  portal_memberdata might not exist, yet 
applications can assume that members have certain properties, either 
through the existence of a portal_memberdata tool or directly through 
the user object.  However, there is no documented way for applications 
to find out *which* properties are available.  I have not found a way to 
solve that problem, since user folders provide no common API for 
property discovery.  Perhaps we need to standardize on the property 
management API.

> Is portal_memberdata still
> the "right way" to get and set member properties in the case where the
> member properties (and thus member object) exists?

No, it never was.  But now that I look at RegistrationTool, I see that 
someone removed the method for setting member properties!  Yet it was 
left in the interface.  I'm sure someone meant well, but this is not 
what was intended.  The loss of that method means you really do have to 
access the memberdata tool directly. :-(

Oh well.  This isn't a severe problem, but it does make CMF harder to 
customize.  I'm sorry I failed to express the intent adequately.

Shane