summaryrefslogtreecommitdiff
path: root/plugins/password/drivers/ldap_simple.php
diff options
context:
space:
mode:
authorCyrill von Wattenwyl <cvw@adfinis.com>2014-09-02 11:20:52 +0200
committerCyrill von Wattenwyl <cvw@adfinis.com>2014-09-02 11:20:52 +0200
commit11a40dd1fef6c5b78b054617caba4325f95ee386 (patch)
treede2e1d7efd6423ef4d1256dd5c90a972ad172719 /plugins/password/drivers/ldap_simple.php
parent187fd666aa2f32dedfe544d69b7cb213698197f2 (diff)
parentba084313bfc9c7a5a83e0611fe4376543cc1653d (diff)
Merge branch 'master' of https://github.com/roundcube/roundcubemail
Conflicts: plugins/password/config.inc.php.dist
Diffstat (limited to 'plugins/password/drivers/ldap_simple.php')
-rw-r--r--plugins/password/drivers/ldap_simple.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/password/drivers/ldap_simple.php b/plugins/password/drivers/ldap_simple.php
index 3e167ea5b..3c19ccde5 100644
--- a/plugins/password/drivers/ldap_simple.php
+++ b/plugins/password/drivers/ldap_simple.php
@@ -168,14 +168,16 @@ class rcube_ldap_simple_password
*/
function search_userdn($rcmail, $ds)
{
- $search_user = $rcmail->config->get('password_ldap_searchDN');
- $search_pass = $rcmail->config->get('password_ldap_searchPW');
+ $search_user = $rcmail->config->get('password_ldap_searchDN');
+ $search_pass = $rcmail->config->get('password_ldap_searchPW');
+ $search_base = $rcmail->config->get('password_ldap_search_base');
+ $search_filter = $rcmail->config->get('password_ldap_search_filter');
- if (empty($search_user)) {
- return null;
+ if (empty($search_filter)) {
+ return false;
}
- $this->_debug("C: Bind $search_user, pass: **** [" . strlen($search_pass) . "]");
+ $this->_debug("C: Bind " . ($search_user ? $search_user : '[anonymous]'));
// Bind
if (!ldap_bind($ds, $search_user, $search_pass)) {
@@ -185,9 +187,6 @@ class rcube_ldap_simple_password
$this->_debug("S: OK");
- $search_base = $rcmail->config->get('password_ldap_search_base');
- $search_filter = $rcmail->config->get('password_ldap_search_filter');
-
$search_base = rcube_ldap_password::substitute_vars($search_base);
$search_filter = rcube_ldap_password::substitute_vars($search_filter);