[Zope-CMF] Saving custom data in a MemberData-object from python

Dieter Maurer dieter@handshake.de
Fri, 20 Apr 2001 21:40:37 +0200 (CEST)


Sigve Tjora writes:
 > I want to save some data about users in their MemberData-object, and I use
 > python for the task. Is it ok just to set a propertie on an
 > MemberData-object or is there a better way?
 > 
 > Eg. can I just write
 >   user=portal_membership.getAuthenticatedUser()
 >   user.myData="Just an object or a text..."
Be careful when you assign objects to attribute of
persistent objects:

  The ZODB does not like to store (Acquisition) wrapped objects.
  There are a few more restrictions.

  Failure to observe them with  result in nasty pickling exceptions.


Dieter