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 @@ public function checkCredentials($remoteIp, $clientIpId, $login, $password)
// Check credentials // Check credentials
try { try {
if (($this->configManager->get('ldap.host') != "" && $this->checkCredentialsFromLdap($login, $password)) $useLdapLogin = !empty($this->configManager->get('ldap.host'));
|| ($this->configManager->get('ldap.host') == "" && $this->checkCredentialsFromLocalConfig($login, $password))) { if ((false === $useLdapLogin && $this->checkCredentialsFromLocalConfig($login, $password))
|| (true === $useLdapLogin && $this->checkCredentialsFromLdap($login, $password))
) {
$this->sessionManager->storeLoginInfo($clientIpId); $this->sessionManager->storeLoginInfo($clientIpId);
logm( logm(
$this->configManager->get('resource.log'), $this->configManager->get('resource.log'),