twofactorManager = $twofactorManager; } protected function run($argument) { $this->userManager->callForSeenUsers(function (IUser $user): void { if (!$user->isEnabled()) { return; } $providers = $this->registry->getProviderStates($user); $isTwoFactorAuthenticated = $this->twofactorManager->isTwoFactorAuthenticated($user); if ($isTwoFactorAuthenticated && isset($providers['backup_codes']) && $providers['backup_codes'] === false) { $this->jobList->add(RememberBackupCodesJob::class, ['uid' => $user->getUID()]); } }); } }