summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2018-01-11 13:20:17 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2018-01-11 13:20:17 +0100
commitf292f98060b8f19893f6d4c311bf044428e72c04 (patch)
tree35f4046e6b63921fcb9a4366a62c9f2fe1327da2 /apps
parent2a24f45b5fc8786da607f2065f73fa7133b76d04 (diff)
downloadnextcloud-server-f292f98060b8f19893f6d4c311bf044428e72c04.tar.gz
nextcloud-server-f292f98060b8f19893f6d4c311bf044428e72c04.zip
when paged results are turned off, all (max possible) users are returned
thus hasMoreResult should return false Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/lib/Jobs/Sync.php2
-rw-r--r--apps/user_ldap/tests/Jobs/SyncTest.php3
2 files changed, 3 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Jobs/Sync.php b/apps/user_ldap/lib/Jobs/Sync.php
index b78a1947e27..dc8a14d111b 100644
--- a/apps/user_ldap/lib/Jobs/Sync.php
+++ b/apps/user_ldap/lib/Jobs/Sync.php
@@ -177,7 +177,7 @@ class Sync extends TimedJob {
);
if($connection->ldapPagingSize === 0) {
- return true;
+ return false;
}
return count($results) >= $connection->ldapPagingSize;
}
diff --git a/apps/user_ldap/tests/Jobs/SyncTest.php b/apps/user_ldap/tests/Jobs/SyncTest.php
index f8852a46664..c6cb9549b07 100644
--- a/apps/user_ldap/tests/Jobs/SyncTest.php
+++ b/apps/user_ldap/tests/Jobs/SyncTest.php
@@ -158,7 +158,8 @@ class SyncTest extends TestCase {
return [
[ 3, 3, true ],
[ 3, 5, true ],
- [ 3, 2, false]
+ [ 3, 2, false],
+ [ 0, 4, false]
];
}