aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/controller/admin/LogoutController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/front/controller/admin/LogoutController.php')
-rw-r--r--application/front/controller/admin/LogoutController.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/application/front/controller/admin/LogoutController.php b/application/front/controller/admin/LogoutController.php
index c5984814..28165129 100644
--- a/application/front/controller/admin/LogoutController.php
+++ b/application/front/controller/admin/LogoutController.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
4 4
5namespace Shaarli\Front\Controller\Admin; 5namespace Shaarli\Front\Controller\Admin;
6 6
7use Shaarli\Security\CookieManager;
7use Shaarli\Security\LoginManager; 8use Shaarli\Security\LoginManager;
8use Slim\Http\Request; 9use Slim\Http\Request;
9use Slim\Http\Response; 10use Slim\Http\Response;
@@ -20,9 +21,12 @@ class LogoutController extends ShaarliAdminController
20 { 21 {
21 $this->container->pageCacheManager->invalidateCaches(); 22 $this->container->pageCacheManager->invalidateCaches();
22 $this->container->sessionManager->logout(); 23 $this->container->sessionManager->logout();
23 24 $this->container->cookieManager->setCookieParameter(
24 // TODO: switch to a simple Cookie manager allowing to check the session, and create mocks. 25 CookieManager::STAY_SIGNED_IN,
25 setcookie(LoginManager::$STAY_SIGNED_IN_COOKIE, 'false', 0, $this->container->basePath . '/'); 26 'false',
27 0,
28 $this->container->basePath . '/'
29 );
26 30
27 return $this->redirect($response, '/'); 31 return $this->redirect($response, '/');
28 } 32 }