1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-05 14:04:57 +02:00

Merge PR #813 branch 'develop-olympus' into develop

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

View File

@ -155,7 +155,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),
);
}
}