aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-05-21 22:35:54 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2012-05-21 22:35:54 -0400
commit6f6cf20d61d3e0b570a5b0b568550064a06ac9ca (patch)
treeb1faa84e89767016128f73540ef3956c156179bc
parent44b3ab102a89ba02afd522a9ff240006ff9c61bf (diff)
parenta97ebe78bfddd1ec20903183087c20a936a96a23 (diff)
downloadforums-6f6cf20d61d3e0b570a5b0b568550064a06ac9ca.tar
forums-6f6cf20d61d3e0b570a5b0b568550064a06ac9ca.tar.gz
forums-6f6cf20d61d3e0b570a5b0b568550064a06ac9ca.tar.bz2
forums-6f6cf20d61d3e0b570a5b0b568550064a06ac9ca.tar.xz
forums-6f6cf20d61d3e0b570a5b0b568550064a06ac9ca.zip
Merge PR #813 branch 'develop-olympus' into develop
* develop-olympus: [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 b2f45f046c..26029efe1e 100644
--- a/phpBB/includes/auth/auth_ldap.php
+++ b/phpBB/includes/auth/auth_ldap.php
@@ -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),
+ );
}
}