[turba] Re: LDAP scope

mbydalek at mobilemini.com mbydalek at mobilemini.com
Tue Feb 22 14:58:14 PST 2005


> -----Original Message-----
> From: Chuck Hagenbuch [mailto:chuck at horde.org] 
> Sent: Tuesday, February 22, 2005 2:53 PM
> To: turba at lists.horde.org
> Subject: [turba] Re: LDAP scope
> 
> Quoting Craig White <craigwhite at azapple.com>:
> 
> > I would recommend changing ldap.php though
> >
> > line 145
> >
> > replace ldap_search
> > with    ldap_list
> >
> > as it does a scope one search and not a scope sub search
> 
> I've committed this to HEAD. Please test; we'll merge it if 
> it checks out.

Chuck,

I think you need to commit more than just changing ldap_search to ldap_list
as they do completely different things.  Basically, it seems that PHP
doesn't have a 'scope' param when searching, but they have 2 functions.
Ldap_list searches the current level, while ldap_search searches the entire
tree.  This is what I interpreted from
http://us2.php.net/manual/en/function.ldap-list.php

Someone before mentioned having a param 'scope' and if
$conf['ldap']['scope'] = 'sub', then use ldap_search, otherwise use
ldap_list (or vice-versa).

For me, ldap_list won't work correctly and I need ldap_search as I have a
very non-flat tree. :)

Thoughts?

-Mike


More information about the turba mailing list