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

Cyrille Giquello cyrille@ktaland.com
Fri, 22 Jun 2001 12:15:15 +0200


Hi all,
I'm joinning this thread to profite of the subject to ask a question abou=
t
portal_membership.

You're using portal_membership.getMemberById(id).getUserName()
but wich method we've to use to get information with the username.

I get the username, but I can't call
    getHomeFolder(id=3DNone, verifyPermission=3D0):
because it need the Id.

Why there isn't any method to get information or Id from username ???

Thanx,
Cyrille

Gr=E9goire Weber a =E9crit :

> Hi Dan,
>
> I read the digest today in the morning: So, sorry for the late answer a=
bout
> 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 t=
he
> 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=E9goire Weber
> Rigistr. 31
> CH-8006 Z=FCrich
> Switzerland
> phone:  +41-(0)1-361 66 11
> mobile: +41-(0)79-44 11 457
> mailto:gregoire.weber@switzerland.org
>
> _______________________________________________
> 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 featur=
e requests