[Zope-CMF] get a members name / 'project' object into a member folder

Grégoire Weber gregoire.weber@switzerland.org
Fri, 22 Jun 2001 11:58:40 +0200


Hi Dan,

I read the digest today in the morning: So, sorry for the late answer about
your helpful tip!

> > 1. Get a members name
> > ---------------------
> [...]
> 
> 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()
Oh, lots of thanks! That's it! 
It's not clear to me why I didnt't find this myself. I even looked at the
portal_membership class.

I recognised that this protected by a Permission (Manager role only) I
don't want to change. 
So I gave the dtml method the Manager proxy role. And it worked!

Zope/CMF is cool!

Greg
_____________________________________
Grégoire Weber
Rigistr. 31
CH-8006 Zürich
Switzerland
phone:  +41-(0)1-361 66 11
mobile: +41-(0)79-44 11 457
mailto:gregoire.weber@switzerland.org