Update application/security/LoginManager.php

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

View file

@ -206,7 +206,12 @@ class LoginManager
{
$connect = $connect ?? function($host) { return ldap_connect($host); };
$bind = $bind ?? function($handle, $dn, $password) { return ldap_bind($handle, $dn, $password); };
return $bind($connect($this->configManager->get('ldap.host')), sprintf($this->configManager->get('ldap.dn'), $login), $password);
return $bind(
$connect($this->configManager->get('ldap.host')),
sprintf($this->configManager->get('ldap.dn'), $login),
$password
);
}
/**