From f292f98060b8f19893f6d4c311bf044428e72c04 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 11 Jan 2018 13:20:17 +0100 Subject: [PATCH] when paged results are turned off, all (max possible) users are returned thus hasMoreResult should return false Signed-off-by: Arthur Schiwon --- apps/user_ldap/lib/Jobs/Sync.php | 2 +- apps/user_ldap/tests/Jobs/SyncTest.php | 3 ++- 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 b78a1947e2..dc8a14d111 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 f8852a4666..c6cb9549b0 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] ]; }