Update application/security/LoginManager.php

Co-authored-by: ArthurHoaro <arthur@hoa.ro>
This commit is contained in:
Sébastien NOBILI 2020-06-03 10:34:32 +02:00 committed by GitHub
parent 46846fd4fc
commit 21e5df5ee8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,8 +147,10 @@ class LoginManager
// Check credentials
try {
if (($this->configManager->get('ldap.host') != "" && $this->checkCredentialsFromLdap($login, $password))
|| ($this->configManager->get('ldap.host') == "" && $this->checkCredentialsFromLocalConfig($login, $password))) {
$useLdapLogin = !empty($this->configManager->get('ldap.host'));
if ((false === $useLdapLogin && $this->checkCredentialsFromLocalConfig($login, $password))
|| (true === $useLdapLogin && $this->checkCredentialsFromLdap($login, $password))
) {
$this->sessionManager->storeLoginInfo($clientIpId);
logm(
$this->configManager->get('resource.log'),