From de50126b6e65f94897e4d873e571fee8e379f346 Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Wed, 13 Feb 2008 11:28:40 +1300 Subject: [PATCH] Fix the deferencing of the query variables for LDAP scope to work. --- inc/drivers_ldap.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/inc/drivers_ldap.php b/inc/drivers_ldap.php index 9b084234..648d1043 100644 --- a/inc/drivers_ldap.php +++ b/inc/drivers_ldap.php @@ -119,7 +119,9 @@ class ldapDrivers */ function getAllUsers($attributes){ global $c; - $entry = $this->ldap_query_all($this->connect,$this->baseDNUsers,$this->filterUsers,$attributes); + + $query = $this->ldap_query_all; + $entry = $query($this->connect,$this->baseDNUsers,$this->filterUsers,$attributes); if (!ldap_first_entry($this->connect,$entry)) $c->messages[] = sprintf(i18n("Error NoUserFound with filter >%s<, attributes >%s< , dn >%s<"),$this->filterUsers,join(', ',$attributes), $this->baseDNUsers); for($i=ldap_first_entry($this->connect,$entry); @@ -147,7 +149,8 @@ class ldapDrivers $entry=NULL; // We get the DN of the USER - $entry = this->ldap_query($this->connect, $this->baseDNUsers, $filter,$attributes); + $query = $this->ldap_query_one; + $entry = $query($this->connect, $this->baseDNUsers, $filter,$attributes); if ( !ldap_first_entry($this->connect, $entry) ){ dbg_error_log( "ERROR", "drivers_ldap : Unable to find the user with filter %s",$filter ); return false;