diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index 022186b8de1..18800c3a19e 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -46,7 +46,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) // Force master entity in transversal mode $entity = $entitytotest; - if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { + if (isModEnabled('multicompany') && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $entity = 1; } @@ -228,7 +228,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) unset($usertmp); } - if (!empty($conf->multicompany->enabled)) { // We must check entity (even if sync is not active) + if (isModEnabled('multicompany')) { // We must check entity (even if sync is not active) global $mc; $usertmp = new User($db);