diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-01-23 21:52:03 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | 8e47af2b3620c920116ec056173277c039163ec1 (patch) | |
tree | d77f31f17bf4485f5a3ec0fea895205e9bde0554 /index.php | |
parent | b0428aa9b02b058b72c40b6e8dc2298d55bf692f (diff) | |
download | Shaarli-8e47af2b3620c920116ec056173277c039163ec1.tar.gz Shaarli-8e47af2b3620c920116ec056173277c039163ec1.tar.zst Shaarli-8e47af2b3620c920116ec056173277c039163ec1.zip |
Process logout through Slim controller
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -604,10 +604,7 @@ function renderPage($conf, $pluginManager, $bookmarkService, $history, $sessionM | |||
604 | } | 604 | } |
605 | // -------- User wants to logout. | 605 | // -------- User wants to logout. |
606 | if (isset($_SERVER['QUERY_STRING']) && startsWith($_SERVER['QUERY_STRING'], 'do=logout')) { | 606 | if (isset($_SERVER['QUERY_STRING']) && startsWith($_SERVER['QUERY_STRING'], 'do=logout')) { |
607 | invalidateCaches($conf->get('resource.page_cache')); | 607 | header('Location: ./logout'); |
608 | $sessionManager->logout(); | ||
609 | setcookie(LoginManager::$STAY_SIGNED_IN_COOKIE, 'false', 0, WEB_PATH); | ||
610 | header('Location: ?'); | ||
611 | exit; | 608 | exit; |
612 | } | 609 | } |
613 | 610 | ||
@@ -1894,7 +1891,7 @@ if (isset($_SERVER['QUERY_STRING']) && startsWith($_SERVER['QUERY_STRING'], 'do= | |||
1894 | exit; | 1891 | exit; |
1895 | } | 1892 | } |
1896 | 1893 | ||
1897 | $containerBuilder = new ContainerBuilder($conf, $sessionManager, $loginManager); | 1894 | $containerBuilder = new ContainerBuilder($conf, $sessionManager, $loginManager, WEB_PATH); |
1898 | $container = $containerBuilder->build(); | 1895 | $container = $containerBuilder->build(); |
1899 | $app = new App($container); | 1896 | $app = new App($container); |
1900 | 1897 | ||