if(preg_match('/dol_login/i',$sessValues)&&// limit to dolibarr session
preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i',$sessValues)&&// limit to current entity
(preg_match('/dol_entity\|i:'.$conf->entity.';/i',$sessValues)||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