diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2013-05-22 10:17:06 (GMT) |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2013-05-24 10:27:04 (GMT) |
commit | ec9e9cde0fdb08177943ee925ee57718e3fe9c52 (patch) | |
tree | 77e7eaf427f60d6c9a5bd9574b64818524366ceb /lib | |
parent | cf82ef096e22564761161cda6b606127de3bdfd5 (diff) | |
download | Net_LDAP3-ec9e9cde0fdb08177943ee925ee57718e3fe9c52.tar.gz |
Do not call legacy_rights() Do not call domain_root_dn() Ensure groups is a valid result set, and return the entries rather than the object
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Net/LDAP3.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php index a5351fe..9355869 100644 --- a/lib/Net/LDAP3.php +++ b/lib/Net/LDAP3.php @@ -554,7 +554,7 @@ class Net_LDAP3 if (!in_array($effective_rights_control_oid, $supported_controls)) { $this->_debug("LDAP: No getEffectiveRights control in supportedControls"); - return $this->legacy_rights($subject); + return false; } $attributes = array( @@ -679,6 +679,9 @@ class Net_LDAP3 } $unique_attr = $this->config_get('unique_attribute', 'nsuniqueid'); + + Log::trace("Using unique_attribute " . var_export($unique_attr, TRUE) . " at " . __FILE__ . ":" . __LINE__); + $attributes = array_merge(array($unique_attr => $subject), (array)$attributes); $subject = $this->entry_find_by_attribute($attributes, $base_dn); @@ -730,7 +733,7 @@ class Net_LDAP3 $this->_debug(__FILE__ . "(" . __LINE__ . "): " . $member_dn); $groups = array(); - $root_dn = $this->domain_root_dn($this->domain); + $root_dn = $this->config_get('root_dn'); // TODO: Do not query for both, it's either one or the other $entries = $this->search($root_dn, "(|" . @@ -738,7 +741,9 @@ class Net_LDAP3 "(&(objectclass=groupofuniquenames)(uniquemember=$member_dn))" . ")"); - $groups = array_keys($entries); + if ($entries) { + $groups = array_keys($entries->entries(TRUE)); + } return $groups; } |