Avoid fatal error when multicompany not correctly installed
This commit is contained in:
parent
e0e9701830
commit
76e8d6d36d
@ -233,6 +233,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
|
|||||||
|
|
||||||
$usertmp = new User($db);
|
$usertmp = new User($db);
|
||||||
$usertmp->fetch('', $login);
|
$usertmp->fetch('', $login);
|
||||||
|
if (is_object($mc)) {
|
||||||
$ret = $mc->checkRight($usertmp->id, $entitytotest);
|
$ret = $mc->checkRight($usertmp->id, $entitytotest);
|
||||||
if ($ret < 0) {
|
if ($ret < 0) {
|
||||||
dol_syslog("functions_ldap::check_user_password_ldap Authentication KO entity '".$entitytotest."' not allowed for user id '".$usertmp->id."'", LOG_NOTICE);
|
dol_syslog("functions_ldap::check_user_password_ldap Authentication KO entity '".$entitytotest."' not allowed for user id '".$usertmp->id."'", LOG_NOTICE);
|
||||||
@ -241,6 +242,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
|
|||||||
unset($usertmp);
|
unset($usertmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ($result == 1) {
|
if ($result == 1) {
|
||||||
dol_syslog("functions_ldap::check_user_password_ldap Authentication KO bad user/password for '".$usertotest."'", LOG_NOTICE);
|
dol_syslog("functions_ldap::check_user_password_ldap Authentication KO bad user/password for '".$usertotest."'", LOG_NOTICE);
|
||||||
sleep(1);
|
sleep(1);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user