audleman wrote:
> Hello all,
>
> I have added a few properties to my memberdata, namely "organization" and
> "region." I am trying to update the author.cpt template (e.g. what you see
> when you click on a users name anywhere in the site) to display these new
> fields but have run into a stumbling block. This template calls the function
> mtool.getMemberInfo to bring in member properties but it doesn't include any
> custom. Indeed, I checked out the documentation for the function in
> MembershipTool.py and the function politely tells me
>
> """
> Return 'harmless' Memberinfo of any member, such as Full name, Location,
> etc.
> """
>
> So how do I gain access to my additional properties?
>
> The author.cpt template has the following defined:
>
> mtool - I assume this means membership tool
> author - A string with the author name
>
> I would think I should try to get the member object then call
> member.getProperty for each of my properties. However I don't know how to
> get the member object.
>
context.portal_membership.getMemberById(<some member id string>)
note, however, that this returns the fully decorated member
object including potentially sensitive info. Therefore, this
call is protected by the 'Manage portal' permission.
Alternatively, you can patch the 'getMemberInfo' method to include
your custom properties.
Or you write a custom method in trusted code (file system) based
on the above.
HTH
Raphael
BTW: stuff like that isn't exactly setup/installation related and
could also be asked on 'plone-users' where more people would see it.
> Any help greatly appreciated.
>
> Thanks,
> Kevin
_______________________________________________
Setup mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/setup