diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-07 17:47:10 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-07 17:47:10 +0100 |
commit | 000523a7fe5b8b071af0a84f3d430c4994bd076d (patch) | |
tree | 332ea5661bc73be6efc5aef32b6290ac4fd46ef8 /apps | |
parent | 939ba745ee56b51a010d9c1829db1dc0545ed57c (diff) | |
parent | f864b55323330db8ff7e6e66e6b9da6daf2e68ca (diff) | |
download | nextcloud-server-000523a7fe5b8b071af0a84f3d430c4994bd076d.tar.gz nextcloud-server-000523a7fe5b8b071af0a84f3d430c4994bd076d.zip |
Merge pull request #18212 from ryno83/treat_LDAP_users_not_available_by_user_filter_as_deleted
treat LDAP users not available by user filter as deleted
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/lib/access.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/user_ldap.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index 42e57e8296e..667f1076235 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -177,7 +177,7 @@ class Access extends LDAPUtility implements user\IUserTools { //in case an error occurs , e.g. object does not exist return false; } - if (empty($attr)) { + if (empty($attr) && ($filter === 'objectclass=*' || $this->ldap->countEntries($cr, $rr) === 1)) { \OCP\Util::writeLog('user_ldap', 'readAttribute: '.$dn.' found', \OCP\Util::DEBUG); return array(); } diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index fc8ce361637..0097dda89b5 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -204,7 +204,7 @@ class USER_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn $dn = $user->getDN(); //check if user really still exists by reading its entry - if(!is_array($this->access->readAttribute($dn, ''))) { + if(!is_array($this->access->readAttribute($dn, '', $this->access->connection->ldapUserFilter))) { $lcr = $this->access->connection->getConnectionResource(); if(is_null($lcr)) { throw new \Exception('No LDAP Connection to server ' . $this->access->connection->ldapHost); |