2021-04-28 08:25:17 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
/**
|
2024-05-10 09:09:14 -04:00
|
|
|
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2021-04-28 08:25:17 -04:00
|
|
|
*/
|
|
|
|
|
namespace OC\Core\BackgroundJobs;
|
|
|
|
|
|
2022-06-28 06:55:26 -04:00
|
|
|
use OCP\AppFramework\Utility\ITimeFactory;
|
|
|
|
|
use OCP\BackgroundJob\QueuedJob;
|
2021-04-28 08:25:17 -04:00
|
|
|
use OCP\IConfig;
|
|
|
|
|
use OCP\IUser;
|
|
|
|
|
use OCP\IUserManager;
|
|
|
|
|
|
|
|
|
|
class LookupServerSendCheckBackgroundJob extends QueuedJob {
|
2023-06-23 15:33:56 -04:00
|
|
|
public function __construct(
|
|
|
|
|
protected IConfig $config,
|
|
|
|
|
private IUserManager $userManager,
|
|
|
|
|
ITimeFactory $time,
|
|
|
|
|
) {
|
2022-06-28 06:55:26 -04:00
|
|
|
parent::__construct($time);
|
2021-04-28 08:25:17 -04:00
|
|
|
}
|
|
|
|
|
|
2023-07-06 05:09:41 -04:00
|
|
|
/**
|
|
|
|
|
* @param array $argument
|
|
|
|
|
*/
|
|
|
|
|
public function run($argument): void {
|
2021-04-28 08:25:17 -04:00
|
|
|
$this->userManager->callForSeenUsers(function (IUser $user) {
|
|
|
|
|
$this->config->setUserValue($user->getUID(), 'lookup_server_connector', 'dataSend', '1');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|