Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix use of executeQuery and -Statement
Signed-off-by: Arthur Schiwon <[email protected]>
  • Loading branch information
blizzz committed Feb 10, 2022
commit 37a5a266df225d15849e4dbeaf36e67658d63248
2 changes: 1 addition & 1 deletion apps/user_ldap/lib/Mapping/AbstractMapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public function getList(int $offset = 0, int $limit = null, bool $invalidatedOnl
$select->where($select->expr()->like('directory_uuid', $select->createNamedParameter('invalidated_%')));
}

$result = $select->executeQuery();
$result = $select->execute();
$entries = $result->fetchAll();
$result->closeCursor();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ protected function invalidateUuids(string $table, array $idList): void {
$update->setParameter('nextcloudId', $nextcloudId);
$update->setParameter('invalidatedUuid', 'invalidated_' . \bin2hex(\random_bytes(6)));
try {
$update->executeStatement();
$update->execute();
$this->logger->warning(
'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.',
[
Expand Down Expand Up @@ -247,7 +247,7 @@ protected function getNextcloudIdsByUuid(string $table, string $uuid): array {
->from($table)
->where($select->expr()->eq('directory_uuid', $select->createNamedParameter($uuid)));

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

$result = $select->executeQuery();
$result = $select->execute();
while ($uuid = $result->fetchOne()) {
yield $uuid;
}
Expand Down