diff options
Diffstat (limited to 'app/Core/Session/SessionManager.php')
-rw-r--r-- | app/Core/Session/SessionManager.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/app/Core/Session/SessionManager.php b/app/Core/Session/SessionManager.php index 6153efeb..750711b0 100644 --- a/app/Core/Session/SessionManager.php +++ b/app/Core/Session/SessionManager.php @@ -14,6 +14,13 @@ use Kanboard\Core\Http\Request; class SessionManager extends Base { /** + * Event names + * + * @var string + */ + const EVENT_DESTROY = 'session.destroy'; + + /** * Return true if the session is open * * @static @@ -41,7 +48,7 @@ class SessionManager extends Base session_name('KB_SID'); session_start(); - $this->container['sessionStorage']->setStorage($_SESSION); + $this->sessionStorage->setStorage($_SESSION); } /** @@ -51,6 +58,8 @@ class SessionManager extends Base */ public function close() { + $this->dispatcher->dispatch(self::EVENT_DESTROY); + // Destroy the session cookie $params = session_get_cookie_params(); @@ -80,7 +89,7 @@ class SessionManager extends Base SESSION_DURATION, $this->helper->url->dir() ?: '/', null, - Request::isHTTPS(), + $this->request->isHTTPS(), true ); |