Fixed installer with OnlineService

This commit is contained in:
Lucas Bartholemy 2023-07-21 22:56:21 +02:00
parent 63a46804f8
commit f3edc3fde7

View File

@ -11,6 +11,7 @@ namespace humhub\components;
use humhub\components\access\ControllerAccess;
use humhub\components\access\StrictAccess;
use humhub\components\behaviors\AccessControl;
use humhub\models\Setting;
use humhub\modules\user\services\IsOnlineService;
use Yii;
use yii\helpers\Html;
@ -221,9 +222,12 @@ class Controller extends \yii\web\Controller
if (!Yii::$app->request->isAjax || Yii::$app->request->isPjax) {
$this->setJsViewStatus();
if (Setting::isInstalled()) {
// Update "is online" status ony on full page loads
(new IsOnlineService(Yii::$app->user->identity))->updateStatus();
}
}
return true;
}