0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-03-04 20:14:50 +00:00
nextcloud_server/lib/private/Repair/NC29/SanitizeAccountProperties.php
Ferdinand Thiessen e3af27b280
refactor: convert sanitize account properties repair step to background job
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-02-24 15:16:28 +01:00

30 lines
726 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OC\Repair\NC29;
use OCP\BackgroundJob\IJobList;
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
class SanitizeAccountProperties implements IRepairStep {
public function __construct(
private IJobList $jobList,
) {
}
public function getName(): string {
return 'Validate account properties and store phone numbers in a known format for search';
}
public function run(IOutput $output): void {
$this->jobList->add(SanitizeAccountPropertiesJob::class, null);
$output->info('Queued background to validate account properties.');
}
}