aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/auth/auth_ldap.php
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2009-07-18 21:20:20 +0000
committerChris Smith <toonarmy@phpbb.com>2009-07-18 21:20:20 +0000
commit94e29c3c170a1fd1e6c2794090232220ecb2d5f4 (patch)
tree61340871df034fdb8cdab9b90c5813fd046b538f /phpBB/includes/auth/auth_ldap.php
parent2d75b39626b2876c53795ca64d3e98d979f9014d (diff)
downloadforums-94e29c3c170a1fd1e6c2794090232220ecb2d5f4.tar
forums-94e29c3c170a1fd1e6c2794090232220ecb2d5f4.tar.gz
forums-94e29c3c170a1fd1e6c2794090232220ecb2d5f4.tar.bz2
forums-94e29c3c170a1fd1e6c2794090232220ecb2d5f4.tar.xz
forums-94e29c3c170a1fd1e6c2794090232220ecb2d5f4.zip
Fix #45315
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9783 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/auth/auth_ldap.php')
-rw-r--r--phpBB/includes/auth/auth_ldap.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/includes/auth/auth_ldap.php b/phpBB/includes/auth/auth_ldap.php
index b70e644b14..a6092baba5 100644
--- a/phpBB/includes/auth/auth_ldap.php
+++ b/phpBB/includes/auth/auth_ldap.php
@@ -281,7 +281,8 @@ function ldap_user_filter($username)
$filter = '(' . $config['ldap_uid'] . '=' . ldap_escape(htmlspecialchars_decode($username)) . ')';
if ($config['ldap_user_filter'])
{
- $filter = "(&$filter({$config['ldap_user_filter']}))";
+ $_filter = ($config['ldap_user_filter'][0] == '(' && substr($config['ldap_user_filter'], -1) == ')') ? $config['ldap_user_filter'] : "({$config['ldap_user_filter']})";
+ $filter = "(&{$filter}{$_filter})";
}
return $filter;
}