summaryrefslogtreecommitdiff
path: root/lib/Auth/LDAP.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-10-22 13:25:24 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-26 13:29:47 (GMT)
commit376f798d83f568610f771edc6e42f7d48ccb7863 (patch)
tree1d3c28838f8f55db3ae1e77ff230ada96b5bde54 /lib/Auth/LDAP.php
parent14f390ae2c43ecbd3be0c0a1fe8578e5c305ec3d (diff)
downloadkolab-wap-376f798d83f568610f771edc6e42f7d48ccb7863.tar.gz
Fix PHP fatal error on wrong _search() result
Diffstat (limited to 'lib/Auth/LDAP.php')
-rw-r--r--lib/Auth/LDAP.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index 1428cfc..7178559 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -191,6 +191,7 @@ class LDAP extends Net_LDAP3 {
$this->_log(LOG_DEBUG, "Auth::LDAP::domain_info() uses _search()");
$result = $this->_search($domain_base_dn, $domain_filter, $attributes);
+ $result = $result->entries(true);
} else {
$this->_log(LOG_DEBUG, "Auth::LDAP::domain_info() uses _read()");
$result = $this->_read($domain_dn, $attributes);
@@ -794,6 +795,7 @@ class LDAP extends Net_LDAP3 {
);
$subject = $this->_search($subject_dn);
+ $subject = $subject->entries(true);
$attributes = $this->allowed_attributes($subject[$subject_dn]['objectclass']);
$attributes = array_merge($attributes['may'], $attributes['must']);