aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/security
diff options
context:
space:
mode:
authorSébastien NOBILI <s-code-github@pipoprods.org>2020-06-03 10:34:32 +0200
committerGitHub <noreply@github.com>2020-06-03 10:34:32 +0200
commit21e5df5ee8f302ab96d4ca46ac3070405dd9aafb (patch)
tree23f718ce1a30ae9d7072978538d016ef162837ee /application/security
parent46846fd4fcc391f46f17037d69d0699567ae769e (diff)
downloadShaarli-21e5df5ee8f302ab96d4ca46ac3070405dd9aafb.tar.gz
Shaarli-21e5df5ee8f302ab96d4ca46ac3070405dd9aafb.tar.zst
Shaarli-21e5df5ee8f302ab96d4ca46ac3070405dd9aafb.zip
Update application/security/LoginManager.php
Co-authored-by: ArthurHoaro <arthur@hoa.ro>
Diffstat (limited to 'application/security')
-rw-r--r--application/security/LoginManager.php6
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'),