Fix: create session and cookie for multi-company
This commit is contained in:
parent
260f762e97
commit
908e408750
@ -115,11 +115,7 @@ set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
|
|||||||
// Retrieve the entity
|
// Retrieve the entity
|
||||||
if (isset($_POST["entity"])) $_SESSION["dol_entity"] = $_POST["entity"];
|
if (isset($_POST["entity"])) $_SESSION["dol_entity"] = $_POST["entity"];
|
||||||
$entityCookieName = "DOLENTITYID_dolibarr";
|
$entityCookieName = "DOLENTITYID_dolibarr";
|
||||||
if (isset($_COOKIE[$entityCookieName]))
|
if (isset($_COOKIE[$entityCookieName])) $conf->entity = $_SESSION["dol_entity"] = $_COOKIE[$entityCookieName];
|
||||||
{
|
|
||||||
$conf->entity = $_COOKIE[$entityCookieName];
|
|
||||||
$_SESSION["dol_entity"] = $conf->entity;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set and init common variables
|
// Set and init common variables
|
||||||
require_once("master.inc.php");
|
require_once("master.inc.php");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user