Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Authentication/Token/DefaultTokenCleanupJob.php')
-rw-r--r--lib/private/Authentication/Token/DefaultTokenCleanupJob.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/Authentication/Token/DefaultTokenCleanupJob.php b/lib/private/Authentication/Token/DefaultTokenCleanupJob.php
index 0686f40e82f..7a1e433672f 100644
--- a/lib/private/Authentication/Token/DefaultTokenCleanupJob.php
+++ b/lib/private/Authentication/Token/DefaultTokenCleanupJob.php
@@ -25,9 +25,22 @@ namespace OC\Authentication\Token;
use OC;
use OC\BackgroundJob\Job;
+use OCP\IConfig;
class DefaultTokenCleanupJob extends Job {
+
+ /** @var IConfig */
+ protected $config;
+
+ public function __construct(IConfig $config) {
+ $this->config = $config;
+ }
+
protected function run($argument) {
+ if ($this->config->getSystemValueBool('auth.authtoken.v1.disabled')) {
+ return;
+ }
+
/* @var $provider IProvider */
$provider = OC::$server->query(IProvider::class);
$provider->invalidateOldTokens();