[Zope] Get userobject from python

Gitte Wange gitte@mmmanager.org
Wed, 25 Jul 2001 16:26:06 +0200


On Wednesday 25 July 2001 16:10, you wrote:
> Gitte,
> I have something like this for my portal
>
> <dtml-let member="portal_membership.getAuthenticatedMember()">
>
> <div class="Desktop">
>
> <tr>
> <b><dtml-var "member.first_name">'s Membership</b> </font> </td>
>
> which will return the first name from the registration form of my portal.
>
> hth
>
> Norman

I know this feature .. but I was wondering if I - from any python script 
"under Zope" could get the user object from a specified ID ... and not from a 
dtml method.

>
> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Gitte
> Wange
> Sent: Wednesday, July 25, 2001 2:40 PM
> To: zope@zope.org
> Subject: [Zope] Get userobject from python
>
>
> Hello,
>
> I am trying to find a way to find a user object from the user id in a
> python.
> Since I couldn't find anything in the Zope help I looked at the Membership
> tool from CMF.
> I looked as if I could try with this code:
> user_obj=self.acl_users.getUser(uname)
>
> But get an error saying that the user_obj is None (and therefor it can not
> find the object).
>
> Uname contains the correct Username ...
>
> Anyone who know how to get this object ???
>
> Regards,
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )