1
0

AddCleanupDeletedUsersBackgroundJob.php 691 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\Repair;
  8. use OC\User\BackgroundJobs\CleanupDeletedUsers;
  9. use OCP\BackgroundJob\IJobList;
  10. use OCP\Migration\IOutput;
  11. use OCP\Migration\IRepairStep;
  12. class AddCleanupDeletedUsersBackgroundJob implements IRepairStep {
  13. private IJobList $jobList;
  14. public function __construct(IJobList $jobList) {
  15. $this->jobList = $jobList;
  16. }
  17. public function getName(): string {
  18. return 'Add cleanup-deleted-users background job';
  19. }
  20. public function run(IOutput $output) {
  21. $this->jobList->add(CleanupDeletedUsers::class);
  22. }
  23. }