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

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/cron/updatetoken.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/misc/cron/updatetoken.php b/misc/cron/updatetoken.php
index c06684e4a3..71f2ba03c3 100644
--- a/misc/cron/updatetoken.php
+++ b/misc/cron/updatetoken.php
@@ -51,14 +51,15 @@ function getPiwikDomain()
return null;
}
-$environment = new Environment('cli');
-$environment->init();
$piwikDomain = getPiwikDomain();
if($piwikDomain) {
Url::setHost($piwikDomain);
}
+$environment = new Environment('cli');
+$environment->init();
+
$token = Db::get()->fetchOne("SELECT token_auth
FROM " . Common::prefixTable("user") . "
WHERE superuser_access = 1