aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-05-21 22:35:50 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2012-05-21 22:35:50 -0400
commita97ebe78bfddd1ec20903183087c20a936a96a23 (patch)
treea38e21172581dfca7d8c671898b58f06b588668d
parent3503d7f47b25c5e22bc9188d9182723db0d5d0ab (diff)
parentea1e2ed36280b8e3a4078885a07f7d3398ce5703 (diff)
downloadforums-a97ebe78bfddd1ec20903183087c20a936a96a23.tar
forums-a97ebe78bfddd1ec20903183087c20a936a96a23.tar.gz
forums-a97ebe78bfddd1ec20903183087c20a936a96a23.tar.bz2
forums-a97ebe78bfddd1ec20903183087c20a936a96a23.tar.xz
forums-a97ebe78bfddd1ec20903183087c20a936a96a23.zip
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().
-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),
+ );
}
}