aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-05-22 03:32:54 +0200
committerAndreas Fischer <bantu@phpbb.com>2012-05-22 03:32:54 +0200
commitea1e2ed36280b8e3a4078885a07f7d3398ce5703 (patch)
tree59a0c0508b2183d5d27706e016e33f44ab5970a1
parent86fa185a1ba4754b6c2dc9769b826aa9d57aa148 (diff)
downloadforums-ea1e2ed36280b8e3a4078885a07f7d3398ce5703.tar
forums-ea1e2ed36280b8e3a4078885a07f7d3398ce5703.tar.gz
forums-ea1e2ed36280b8e3a4078885a07f7d3398ce5703.tar.bz2
forums-ea1e2ed36280b8e3a4078885a07f7d3398ce5703.tar.xz
forums-ea1e2ed36280b8e3a4078885a07f7d3398ce5703.zip
[ticket/10401] Return correct type when ldap_bind() fails in ldap_login().
ldap_login() is supposed to return an array. PHPBB3-10401
-rw-r--r--phpBB/includes/auth/auth_ldap.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/includes/auth/auth_ldap.php b/phpBB/includes/auth/auth_ldap.php
index 5dfa74ddab..eebf147d48 100644
--- a/phpBB/includes/auth/auth_ldap.php
+++ b/phpBB/includes/auth/auth_ldap.php
@@ -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),
+ );
}
}