PHP Classes

Bug in ldap_addressbook class

Recommend this page to a friend!

      LDAP Address Book  >  All threads  >  Bug in ldap_addressbook class  >  (Un) Subscribe thread alerts  
Subject:Bug in ldap_addressbook class
Summary:bug on applying filter when fields contains caps
Author:Vincent Pottier
Date:2008-09-13 21:12:50

  1. Bug in ldap_addressbook class   Reply   Report abuse  
Picture of Vincent Pottier Vincent Pottier - 2008-09-13 21:12:50
Doing a search with :
$contacts = $ldap->list_entries(array('dn','cn','mail','mobile', 'telephoneNumber', 'homePhone'));
returns wrong result for fields telephoneNumber and homePhone because the returned array have keys only in lowercase chars (seen with firePHP).

So after :

$list = @ldap_get_entries($this->cid, $raw_data);

I have added the following lines to correct the returned array :
foreach($filter as $f) {
$f2[] = strtolower($f);

Nice little class very handfull !