CheckBackupCodes.php 704 B

12345678910111213141516171819202122232425262728293031
  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. /** @var IJobList */
  13. private $jobList;
  14. public function __construct(IJobList $jobList) {
  15. $this->jobList = $jobList;
  16. }
  17. public function getName(): string {
  18. return 'Add background job to check for backup codes';
  19. }
  20. public function run(IOutput $output) {
  21. $this->jobList->add(\OCA\TwoFactorBackupCodes\BackgroundJob\CheckBackupCodes::class);
  22. }
  23. }