[ticket/10401] Return correct type when ldap_bind() fails in ldap_login().

ldap_login() is supposed to return an array.

PHPBB3-10401
This commit is contained in:
Andreas Fischer 2012-05-22 03:32:54 +02:00
parent 86fa185a1b
commit ea1e2ed362

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