diff options
author | C. Montero Luque <cmonteroluque@users.noreply.github.com> | 2015-11-10 18:54:28 +0100 |
---|---|---|
committer | C. Montero Luque <cmonteroluque@users.noreply.github.com> | 2015-11-10 18:54:28 +0100 |
commit | 98d3111c2d1443710174d4b62394d94c9e843aab (patch) | |
tree | d2784b67777596ff8693b259ed4a179c324f4fa5 | |
parent | dd153a562591d594609792bb7ac4eab8df8f7d21 (diff) | |
parent | 133e3fe89d294244287d7cfa3deda79ab20143c3 (diff) | |
download | nextcloud-server-98d3111c2d1443710174d4b62394d94c9e843aab.tar.gz nextcloud-server-98d3111c2d1443710174d4b62394d94c9e843aab.zip |
Merge pull request #20124 from owncloud/postscriptum-20093
remove uselessly used parameter, read all user attributes also when l…
-rw-r--r-- | apps/user_ldap/group_ldap.php | 5 | ||||
-rw-r--r-- | apps/user_ldap/lib/access.php | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php index d7ca786a439..7c06e24293e 100644 --- a/apps/user_ldap/group_ldap.php +++ b/apps/user_ldap/group_ldap.php @@ -553,6 +553,7 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface { $groupUsers = array(); $isMemberUid = (strtolower($this->access->connection->ldapGroupMemberAssocAttr) === 'memberuid'); + $attrs = $this->access->userManager->getAttributes(true); foreach($members as $member) { if($isMemberUid) { //we got uids, need to get their DNs to 'translate' them to user names @@ -560,11 +561,11 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface { str_replace('%uid', $member, $this->access->connection->ldapLoginFilter), $this->access->getFilterPartForUserSearch($search) )); - $ldap_users = $this->access->fetchListOfUsers($filter, 'dn'); + $ldap_users = $this->access->fetchListOfUsers($filter, $attrs, 1); if(count($ldap_users) < 1) { continue; } - $groupUsers[] = $this->access->dn2username($ldap_users[0]); + $groupUsers[] = $this->access->dn2username($ldap_users[0]['dn'][0]); } else { //we got DNs, check if we need to filter by search or we can give back all of them if(!empty($search)) { diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index d4f4eaddcb3..7be91186c16 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -706,9 +706,8 @@ class Access extends LDAPUtility implements user\IUserTools { * @param array $ldapRecords */ public function batchApplyUserAttributes(array $ldapRecords){ - $displayNameAttribute = strtolower($this->connection->ldapUserDisplayName); foreach($ldapRecords as $userRecord) { - $ocName = $this->dn2ocname($userRecord['dn'][0], $userRecord[$displayNameAttribute]); + $ocName = $this->dn2ocname($userRecord['dn'][0]); $this->cacheUserExists($ocName); $user = $this->userManager->get($ocName); if($user instanceof OfflineUser) { |