1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

Merge PR #813 branch 'bantu/ticket/10401' into develop-olympus

* bantu/ticket/10401:
  [ticket/10401] Return correct type when ldap_bind() fails in ldap_login().
This commit is contained in:
Oleg Pudeyev 2012-05-21 22:35:50 -04:00
commit a97ebe78bf

View File

@ -156,7 +156,11 @@ function login_ldap(&$username, &$password)
{
if (!@ldap_bind($ldap, htmlspecialchars_decode($config['ldap_user']), htmlspecialchars_decode($config['ldap_password'])))
{
return $user->lang['LDAP_NO_SERVER_CONNECTION'];
return array(
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
'error_msg' => 'LDAP_NO_SERVER_CONNECTION',
'user_row' => array('user_id' => ANONYMOUS),
);
}
}