fixed error in ldap create new users

This commit is contained in:
daniel 2017-02-21 14:04:53 +01:00
parent 2abff60380
commit a5055ec27a
1 changed files with 2 additions and 5 deletions

View File

@ -636,11 +636,8 @@ function ldap_process_user_login ($login, $password) {
$ldap_login_attr = isset($config["ldap_login_attr"]) ? io_safe_output($config["ldap_login_attr"]) . "=" : '';
$ldap_base_dn = isset($config["ldap_base_dn"]) ? "," . io_safe_output($config["ldap_base_dn"]) : '';
if (strlen($password) == 0 ||
!@ldap_bind($ds,
$ldap_login_attr. io_safe_output($login) . $ldap_base_dn,
$password)) {
if (strlen($password) == 0 ||
!@ldap_bind($ds, io_safe_output($login), $password) ) {
$config["auth_error"] = 'User not found in database or incorrect password';
@ldap_close ($ds);