[turba] Re: LDAP scope

Craig White craigwhite at azapple.com
Mon Feb 21 19:23:35 PST 2005


On Mon, 2005-02-21 at 21:32 -0500, Edward Rudd wrote:
> On Sun, 20 Feb 2005 19:03:44 -0700, Craig White wrote:
> 
> > [snip]
> > I would rather move my user address books to an entirely different
> > contain than do that as sub searching even with additional restrictions
> > on the filters is if nothing else a waste of time/resources and not
> > necessary.
> > 
> > a quick search of horde/turba/lib/Driver/ldap.php doesn't reveal
> > anything like a scope option which confuses me - as scopes are one of
> > the basic elements of ldapsearch functions.
> 
> the PHP LDAP api is rather awkward is where the issue is. PHP has 3
> functions to search a directory.
> 
> ldap_search  => which is the same as scope=sub
> ldap_list => which is the same as scope=one
> ldap_read => which is the same as scope=base
> 
> So, basically a patch would have to be created against the
> Drivers/ldap.php to provide the scope paramater option, and use the
> appropriate function based on the scope.
----
Excellent explanation -

just for S & G's

I changed the 1 instance of ldap_search to ldap_list in
horde/turba/lib/Driver/ldap.php

and removed my 'filter' in horde/turba/config/sources.php that screened
out the user address book entries and it surely worked...except for one
thing...

when I did a 'search' from that same Address Book, it returned entries
from user address books so that 'sub' scope returned once again, though
I had removed it per above. Hmmm... 

Have to keep playing with this

Thanks Ed

Craig



More information about the turba mailing list