[Zope] Find a user's UserFolder?

Jens Vagelpohl jens@zope.com
Thu, 20 Mar 2003 07:40:14 -0500


depending on how the user object was "produced" you can find out about 
it by looking at the user object's aq_parent. this only works if the 
user is wrapped in the user folder, which it should be if the user 
object has been created "automatically" by the security machinery.

however, if the user object came from a simple call to getUser it might 
not be wrapped. different user folders behave in different ways in that 
case.

jens



On Thursday, Mar 20, 2003, at 00:25 US/Eastern, Paul Winkler wrote:

> Does anybody know a recipe to find out, given a user object
> and a context object, the acl_users folder in which that user lives?
>
> i think i could cook something up with aq_inner and aq_parent but
> i'd first like to know if there's a canonical way to do this.
>
> -- 
>
> Paul Winkler