diff options
-rw-r--r-- | application/security/LoginManager.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/application/security/LoginManager.php b/application/security/LoginManager.php index 2cea3f10..16ef3878 100644 --- a/application/security/LoginManager.php +++ b/application/security/LoginManager.php | |||
@@ -147,8 +147,10 @@ class LoginManager | |||
147 | 147 | ||
148 | // Check credentials | 148 | // Check credentials |
149 | try { | 149 | try { |
150 | if (($this->configManager->get('ldap.host') != "" && $this->checkCredentialsFromLdap($login, $password)) | 150 | $useLdapLogin = !empty($this->configManager->get('ldap.host')); |
151 | || ($this->configManager->get('ldap.host') == "" && $this->checkCredentialsFromLocalConfig($login, $password))) { | 151 | if ((false === $useLdapLogin && $this->checkCredentialsFromLocalConfig($login, $password)) |
152 | || (true === $useLdapLogin && $this->checkCredentialsFromLdap($login, $password)) | ||
153 | ) { | ||
152 | $this->sessionManager->storeLoginInfo($clientIpId); | 154 | $this->sessionManager->storeLoginInfo($clientIpId); |
153 | logm( | 155 | logm( |
154 | $this->configManager->get('resource.log'), | 156 | $this->configManager->get('resource.log'), |