[Zope-CMF] Member Data Question

seb bacon seb@jamkit.com
Tue, 24 Jul 2001 11:59:01 +0100


* CMF <jhgfjhgfjhgfjhgf@hotmail.com> [010724 10:53]:
> Thanks for your help guys, but i'm still puzzled. In MemberData properties,
> I have added the field company. In the join_form i have added a text box
> which takes the value <dtml-var company>. Is that all i am required to do?

That should be fine.

> Will the company data be stored somewhere when Register is hit? Where can i
> see all the stored data as i'm not sure if this is being stored. In the
> Roster From, in the same way as the following code is used
> <dtml-if listed> Yes <dtml-else> No </dtml-if>
> I have added
> <dtml-if company> <dtml-var company> <dtml-else> None </dtml-if>
> But it always returns None, even though it 'should' return some company
> names if i have done everything right? So I obviously haven't, so what am i
> doing wrong?

If you look at the roster form, you'll see that the properties
returned are attributes of the getRoster() method.  If you look at the
MembershipTool, you'll see that this method only returns a subset of
member data tool.  To get attributes of a member, you need to get a
member object from the MembershipTool, for example:

  <dtml-let member="portal_membership.getAuthenticatedMember()">
    <dtml-var "member.company">
  </dtml-let>
> 
> > Yes, you can do that, and then grab some code from a property list page
> > (e.g. from some management interface) and put it into personalize_form.
> 
> > > I've never tried this, but you should be able to add properties from
> > > the properties tab of the MemberData Tool, in the ZMI.
>