[Zope-CMF] how do I get a member's property?

Ausum. ausum_studio@hotmail.com
Wed, 22 May 2002 00:06:32 -0500


To get the property:

<dtml-var "portal_membership.getAuthenticatedMember().getProperty('country')" >

To set the property programatically (provided it was previously
created at portal_memberdata), it depends on what version of CMF
you're using :

For cvs versions after January:

<dtml-call "portal_membership.getAuthenticatedMember().setProperties( 
                                                         country = 'United Kingdom' )" >

Otherwise use:

<dtml-call "portal_registration.setProperties( country = 'United Kingdom' )" >



Ausum



----- Original Message -----
From: "Duane Raymond" <Duane.Raymond@Virgin.net>
To: <zope-cmf@zope.org>
Sent: Monday, May 20, 2002 5:56 PM
Subject: [Zope-CMF] how do I get a member's property?


> Hi,
>
> This is a simple question but one that I have yet to resolve despite
> searching through the discussion archives.
>
> I have added a 'country' property to 'portal_membership' and then
added a
> test member with a value for this property.  I have been able to
retrieve it
> by making changes to the DTML version of roster, but unable to
figure out
> how to do the same in the page templates version of roster.
>
> Can anyone give some quick help and example of how I would call this
> 'country' property (or any other custom property I would add).
>
> Cheers,
>
> Duane
>
>
>
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://www.zope.org/Products/PTK/Tracker for bug reports and
feature requests
>