summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-07 17:47:10 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-07 17:47:10 +0100
commit000523a7fe5b8b071af0a84f3d430c4994bd076d (patch)
tree332ea5661bc73be6efc5aef32b6290ac4fd46ef8 /apps
parent939ba745ee56b51a010d9c1829db1dc0545ed57c (diff)
parentf864b55323330db8ff7e6e66e6b9da6daf2e68ca (diff)
downloadnextcloud-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.php2
-rw-r--r--apps/user_ldap/user_ldap.php2
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);