diff --git a/htdocs/lib/admin.lib.php b/htdocs/lib/admin.lib.php index de452df9fde..d003c0581d3 100644 --- a/htdocs/lib/admin.lib.php +++ b/htdocs/lib/admin.lib.php @@ -471,7 +471,9 @@ function listOfSessions() { $sessValues = file_get_contents($fullpath); // get raw session data - if (eregi('dol_login',$sessValues) && eregi('dol_entity\|s:([0-9]+):"('.$conf->entity.')"',$sessValues)) // limit to dolibarr session and current entity + if (eregi('dol_login',$sessValues) && // limit to dolibarr session + eregi('dol_entity\|s:([0-9]+):"('.$conf->entity.')"',$sessValues) && // limit to current entity + eregi('dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"',$sessValues)) // limit to company name { $tmp=split('_', $file); $idsess=$tmp[1]; @@ -513,7 +515,9 @@ function purgeSessions($mysessionid) { $sessValues = file_get_contents($fullpath); // get raw session data - if (eregi('dol_login',$sessValues) && eregi('dol_entity\|s:([0-9]+):"('.$conf->entity.')"',$sessValues)) // limit to dolibarr session and current entity + if (eregi('dol_login',$sessValues) && // limit to dolibarr session + eregi('dol_entity\|s:([0-9]+):"('.$conf->entity.')"',$sessValues) && // limit to current entity + eregi('dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"',$sessValues)) // limit to company name { $tmp=split('_', $file); $idsess=$tmp[1]; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 21979ce5077..5bb95991387 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -441,6 +441,7 @@ if (! isset($_SESSION["dol_login"])) // New session for this login $_SESSION["dol_login"]=$user->login; $_SESSION["dol_authmode"]=$conf->authmode; + $_SESSION["dol_company"]=$conf->global->MAIN_INFO_SOCIETE_NOM; if ($conf->multicompany->enabled) $_SESSION["dol_entity"]=$conf->entity; dol_syslog("This is a new started user session. _SESSION['dol_login']=".$_SESSION["dol_login"].' Session id='.session_id()); diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index dafb7d45fc9..e1d19b175dd 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -348,7 +348,7 @@ if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC')) $mysoc->siret=empty($conf->global->MAIN_INFO_SIRET)?'':$conf->global->MAIN_INFO_SIRET; $mysoc->ape=empty($conf->global->MAIN_INFO_APE)?'':$conf->global->MAIN_INFO_APE; $mysoc->rcs=empty($conf->global->MAIN_INFO_RCS)?'':$conf->global->MAIN_INFO_RCS; - // Id prof g�n�riques + // Id prof generiques $mysoc->profid1=empty($conf->global->MAIN_INFO_SIREN)?'':$conf->global->MAIN_INFO_SIREN; $mysoc->profid2=empty($conf->global->MAIN_INFO_SIRET)?'':$conf->global->MAIN_INFO_SIRET; $mysoc->profid3=empty($conf->global->MAIN_INFO_APE)?'':$conf->global->MAIN_INFO_APE;