diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-03-08 13:19:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-08 13:19:02 +0100 |
commit | cccf6f4d5f18ad01ff5fcd296d7b8411c1e11139 (patch) | |
tree | 8f9f681909944118928ff1cd0697d724a0ec9719 /apps | |
parent | a2db959f5c43ac6aa50b30c65ef73150c9b720b6 (diff) | |
parent | 2472b93fd99e2270fd240874ee0f3a2c42bce191 (diff) | |
download | nextcloud-server-cccf6f4d5f18ad01ff5fcd296d7b8411c1e11139.tar.gz nextcloud-server-cccf6f4d5f18ad01ff5fcd296d7b8411c1e11139.zip |
Merge pull request #8221 from Cybso/8220_applyLdapUserFilter_on_members
Apply ldapUserFilter on members of group
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/lib/Access.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 0cbe8fd3028..0c87bd9c069 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -537,9 +537,11 @@ class Access extends LDAPUtility implements IUserTools { if($isUser) { $mapper = $this->getUserMapper(); $nameAttribute = $this->connection->ldapUserDisplayName; + $filter = $this->connection->ldapUserFilter; } else { $mapper = $this->getGroupMapper(); $nameAttribute = $this->connection->ldapGroupDisplayName; + $filter = $this->connection->ldapGroupFilter; } //let's try to retrieve the Nextcloud name from the mappings table @@ -563,9 +565,9 @@ class Access extends LDAPUtility implements IUserTools { } if(is_null($ldapName)) { - $ldapName = $this->readAttribute($fdn, $nameAttribute); + $ldapName = $this->readAttribute($fdn, $nameAttribute, $filter); if(!isset($ldapName[0]) && empty($ldapName[0])) { - \OCP\Util::writeLog('user_ldap', 'No or empty name for '.$fdn.'.', \OCP\Util::INFO); + \OCP\Util::writeLog('user_ldap', 'No or empty name for '.$fdn.' with filter '.$filter.'.', \OCP\Util::INFO); return false; } $ldapName = $ldapName[0]; |