diff --git a/htdocs/user/logout.php b/htdocs/user/logout.php index edd860426aa..77a382d9d0e 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 +// 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 +?> \ No newline at end of file