FIX php8 compatibility

This commit is contained in:
Philippe GRAND 2022-08-28 14:03:41 +02:00
parent 352382bced
commit 5877a85284

View File

@ -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);