diff options
author | ArthurHoaro <arthur.hoareau@wizacha.com> | 2020-07-07 10:15:56 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | c4ad3d4f061d05a01db25aa54dda830ba776792d (patch) | |
tree | 691d91a5b0bbac62cee41f7b95ad1daa38d610b3 /application/front/controller/admin | |
parent | 1a8ac737e52cb25a5c346232ee398f5908cee7d7 (diff) | |
download | Shaarli-c4ad3d4f061d05a01db25aa54dda830ba776792d.tar.gz Shaarli-c4ad3d4f061d05a01db25aa54dda830ba776792d.tar.zst Shaarli-c4ad3d4f061d05a01db25aa54dda830ba776792d.zip |
Process Shaarli install through Slim controller
Diffstat (limited to 'application/front/controller/admin')
-rw-r--r-- | application/front/controller/admin/LogoutController.php | 10 |
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 | ||
5 | namespace Shaarli\Front\Controller\Admin; | 5 | namespace Shaarli\Front\Controller\Admin; |
6 | 6 | ||
7 | use Shaarli\Security\CookieManager; | ||
7 | use Shaarli\Security\LoginManager; | 8 | use Shaarli\Security\LoginManager; |
8 | use Slim\Http\Request; | 9 | use Slim\Http\Request; |
9 | use Slim\Http\Response; | 10 | use 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 | } |