setInterval(24 * 60 * 60); $this->setTimeSensitivity(self::TIME_INSENSITIVE); } protected function run($argument) { $this->userManager->callForSeenUsers(function (IUser $user): void { $storages = $this->userGlobalStoragesService->getAllStoragesForUser($user); $usesLoginCredentials = array_reduce($storages, function (bool $uses, StorageConfig $storage) { return $uses || $storage->getAuthMechanism() instanceof LoginCredentials; }, false); if (!$usesLoginCredentials) { $this->credentialsManager->delete($user->getUID(), LoginCredentials::CREDENTIALS_IDENTIFIER); } }); } }