diff --git a/htdocs/user/logout.php b/htdocs/user/logout.php index 3dcd1eae8ff..dd9350977ed 100644 --- a/htdocs/user/logout.php +++ b/htdocs/user/logout.php @@ -76,9 +76,10 @@ session_name($sessionname); session_destroy(); dol_syslog("End of session ".$sessionname); -// TODO Not sure this is required -unset($_SESSION['dol_login']); -unset($_SESSION['dol_entity']); +// Not sure this is required +unset($_SESSION['dol_login']); +unset($_SESSION['dol_entity']); -header("Location: ".$url); +if (GETPOST('noredirect')) return; +header("Location: ".$url); // Default behaviour is redirect to index.php page ?>