From cff9ff01c8338ad9c28af1506a5be153341858d1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Sep 2017 13:30:18 +0200 Subject: [PATCH] Better disconnect with exotic connection mode --- htdocs/user/logout.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/user/logout.php b/htdocs/user/logout.php index 4421c6d6298..8aac6037f65 100644 --- a/htdocs/user/logout.php +++ b/htdocs/user/logout.php @@ -35,7 +35,8 @@ require_once '../main.inc.php'; // This can happen only with a bookmark or forged url call. if (!empty($_SESSION["dol_authmode"]) && ($_SESSION["dol_authmode"] == 'forceuser' || $_SESSION["dol_authmode"] == 'http')) { - die("Disconnection does not work when connection was made in mode ".$_SESSION["dol_authmode"]); + unset($_SESSION["dol_login"]); + die("Applicative disconnection should be useless when connection was made in mode ".$_SESSION["dol_authmode"]); } global $conf, $langs, $user;