Skip to content

Commit 37a5a26

Browse files
committed
fix use of executeQuery and -Statement
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
1 parent be7feb7 commit 37a5a26

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

apps/user_ldap/lib/Mapping/AbstractMapping.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ public function getList(int $offset = 0, int $limit = null, bool $invalidatedOnl
343343
$select->where($select->expr()->like('directory_uuid', $select->createNamedParameter('invalidated_%')));
344344
}
345345

346-
$result = $select->executeQuery();
346+
$result = $select->execute();
347347
$entries = $result->fetchAll();
348348
$result->closeCursor();
349349

apps/user_ldap/lib/Migration/Version1130Date20211102154716.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ protected function invalidateUuids(string $table, array $idList): void {
216216
$update->setParameter('nextcloudId', $nextcloudId);
217217
$update->setParameter('invalidatedUuid', 'invalidated_' . \bin2hex(\random_bytes(6)));
218218
try {
219-
$update->executeStatement();
219+
$update->execute();
220220
$this->logger->warning(
221221
'LDAP user or group with ID {nid} has a duplicated UUID value which therefore was invalidated. You may double-check your LDAP configuration and trigger an update of the UUID.',
222222
[
@@ -247,7 +247,7 @@ protected function getNextcloudIdsByUuid(string $table, string $uuid): array {
247247
->from($table)
248248
->where($select->expr()->eq('directory_uuid', $select->createNamedParameter($uuid)));
249249

250-
$result = $select->executeQuery();
250+
$result = $select->execute();
251251
$idList = [];
252252
while ($id = $result->fetchOne()) {
253253
$idList[] = $id;
@@ -267,7 +267,7 @@ protected function getDuplicatedUuids(string $table): Generator{
267267
->groupBy('directory_uuid')
268268
->having($select->expr()->gt($select->func()->count('owncloud_name'), $select->createNamedParameter(1)));
269269

270-
$result = $select->executeQuery();
270+
$result = $select->execute();
271271
while ($uuid = $result->fetchOne()) {
272272
yield $uuid;
273273
}

0 commit comments

Comments
 (0)