From 32cdb51812343f285fed78f2940fa8062ceac116 Mon Sep 17 00:00:00 2001 From: slawkens Date: Mon, 10 Mar 2025 10:45:39 +0100 Subject: [PATCH] Fixes to account logged --- admin/index.php | 5 ++++- system/src/App/App.php | 1 + system/templates/admin.menus.form.html.twig | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/admin/index.php b/admin/index.php index 3ebb195e..b371103b 100644 --- a/admin/index.php +++ b/admin/index.php @@ -31,7 +31,10 @@ require SYSTEM . 'init.php'; require __DIR__ . '/includes/debugbar.php'; $loginService = new LoginService(); -$logged = $loginService->checkLogin(); +$checkLogin = $loginService->checkLogin(); +$logged = $checkLogin['logged']; +$account_logged = $checkLogin['account']; +app()->setAccountLogged($account_logged); $statusService = new StatusService(); $status = $statusService->checkStatus(); diff --git a/system/src/App/App.php b/system/src/App/App.php index 207e2295..2fe38587 100644 --- a/system/src/App/App.php +++ b/system/src/App/App.php @@ -36,6 +36,7 @@ class App $checkLogin = $loginService->checkLogin(); $logged = $checkLogin['logged']; $account_logged = $checkLogin['account']; + $this->accountLogged = $account_logged; $statusService = new StatusService(); $status = $statusService->checkStatus(); diff --git a/system/templates/admin.menus.form.html.twig b/system/templates/admin.menus.form.html.twig index ae5c4dd1..86f137e4 100644 --- a/system/templates/admin.menus.form.html.twig +++ b/system/templates/admin.menus.form.html.twig @@ -14,8 +14,8 @@ {% endfor %} - - + +