aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Group/Database.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/private/Group/Database.php b/lib/private/Group/Database.php
index 20e56a03d0a..55792ce1dff 100644
--- a/lib/private/Group/Database.php
+++ b/lib/private/Group/Database.php
@@ -352,12 +352,13 @@ class Database extends ABackend implements
}
}
- foreach (array_chunk($notFoundGids, 1000) as $chunk) {
- $qb = $this->dbConn->getQueryBuilder();
- $result = $qb->select('gid', 'displayname')
+ $qb = $this->dbConn->getQueryBuilder();
+ $qb->select('gid', 'displayname')
->from('groups')
- ->where($qb->expr()->in('gid', $qb->createNamedParameter($chunk, IQueryBuilder::PARAM_STR_ARRAY)))
- ->executeQuery();
+ ->where($qb->expr()->in('gid', $qb->createParameter('ids')));
+ foreach (array_chunk($notFoundGids, 1000) as $chunk) {
+ $qb->setParameter('ids', $chunk, IQueryBuilder::PARAM_STR_ARRAY);
+ $result = $qb->executeQuery();
while ($row = $result->fetch()) {
$this->groupCache[(string)$row['gid']] = [
'displayname' => (string)$row['displayname'],