diff --git a/htdocs/user/group/list.php b/htdocs/user/group/list.php index 76f3f73f573..965a3ccc9ae 100644 --- a/htdocs/user/group/list.php +++ b/htdocs/user/group/list.php @@ -94,7 +94,7 @@ if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { } // Users/Groups management only in master entity if transverse mode -if (isModEnabled('multicompany') && $conf->entity > 1 && $conf->global->MULTICOMPANY_TRANSVERSE_MODE) { +if (isModEnabled('multicompany') && $conf->entity > 1 && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')) { accessforbidden(); } diff --git a/htdocs/webservices/server_user.php b/htdocs/webservices/server_user.php index 6c1238cebd5..21a9bbd23d4 100644 --- a/htdocs/webservices/server_user.php +++ b/htdocs/webservices/server_user.php @@ -436,7 +436,7 @@ function getListOfGroups($authentication) $sql = "SELECT g.rowid, g.nom as name, g.entity, g.datec, COUNT(DISTINCT ugu.fk_user) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_usergroup = g.rowid"; - if (isModEnabled('multicompany') && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && !$user->entity))) { + if (isModEnabled('multicompany') && $conf->entity == 1 && (getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE') || ($user->admin && !$user->entity))) { $sql .= " WHERE g.entity IS NOT NULL"; } else { $sql .= " WHERE g.entity IN (0,".$conf->entity.")";