CheckBackupCodes.php 647 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\TwoFactorBackupCodes\Migration;
  8. use OCP\BackgroundJob\IJobList;
  9. use OCP\Migration\IOutput;
  10. use OCP\Migration\IRepairStep;
  11. class CheckBackupCodes implements IRepairStep {
  12. public function __construct(
  13. private IJobList $jobList,
  14. ) {
  15. }
  16. public function getName(): string {
  17. return 'Add background job to check for backup codes';
  18. }
  19. public function run(IOutput $output) {
  20. $this->jobList->add(\OCA\TwoFactorBackupCodes\BackgroundJob\CheckBackupCodes::class);
  21. }
  22. }