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

Sigve Tjora sigve@tjora.no
Mon, 23 Apr 2001 15:55:10 +0200 (CEST)


> Shane:
> > In the member data tool, add a property called "myData".  Then change
> > the code above to:
> >
> > portal_registration.setProperties(myData="some special preference")
>
> I want to store a plain python dictionary, and not just for the
> authenticated user.
>
> If I just store the dictionary in the user object, eg.
>
> user=portal_membership.getAutehnticatedUser()
> user.myData={"id1":"data1", "id2":"data2"}
>
> If I do it this way, the userobject "looses" this property when I restart
> Zope. Why is that? How can I store basic python-objects within the
> userobject?
>
> mvh Sigve Tjora

Somehow this worked now. I can't figure out what I have changed that
should make it work, but it works anyway.

mvh Sigve Tjora