diff --git a/htdocs/lib/admin.lib.php b/htdocs/lib/admin.lib.php index 9bcbbacc25be99aa85f0a06042c12ff997aacacf..56b48160a77eb9b93c89ceb0047151474710925a 100644 --- a/htdocs/lib/admin.lib.php +++ b/htdocs/lib/admin.lib.php @@ -470,10 +470,10 @@ function listOfSessions() if(! @is_dir($fullpath)) { $sessValues = file_get_contents($fullpath); // get raw session data - + if (preg_match('/dol_login/i',$sessValues) && // limit to dolibarr session - preg_match('/dol_entity\|s:([0-9]+):"(/i'.$conf->entity.')"',$sessValues) && // limit to current entity - preg_match('/dol_company\|s:([0-9]+):"(/i'.$conf->global->MAIN_INFO_SOCIETE_NOM.')"',$sessValues)) // limit to company name + preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i',$sessValues) && // limit to current entity + preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i',$sessValues)) // limit to company name { $tmp=explode('_', $file); $idsess=$tmp[1];