mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[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:
parent
86fa185a1b
commit
ea1e2ed362
1 changed files with 5 additions and 1 deletions
|
@ -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),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue