[Zope-CMF] get a members name / 'project' object into a member
folder
Dan L. Pierson
dan@control.com
Thu, 21 Jun 2001 10:12:19 -0400
--On Thursday, June 21, 2001 12:37:53 PM +0200 Gr=E9goire Weber =
<gregoire.weber@switzerland.org> wrote:
> 1. Get a members name
> ---------------------
>
> I'd like to have something like a getMember() (not
> getAuthenticatedUser()!) but couldn't find that in the portal_membership
> interface. Should it be there or can I get this information from an other
> place?
If you look at the actions_box code, you'll see:
portal_membership.getAuthenticatedMember().getUserName()
You need the authenticated user to find our the member's id. If you have
the id some other way, I suspect that the following would work:
portal_membership.getMemberById(id).getUserName()