From e6a7be8b1f9531e35ecf3ed79553072bb2585418 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Thu, 4 Jul 2013 20:01:21 +0200 Subject: [PATCH] Don't add filters for required fields which are already in search filter --- program/lib/Roundcube/rcube_ldap.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php index 922c73568..7c4002337 100644 --- a/program/lib/Roundcube/rcube_ldap.php +++ b/program/lib/Roundcube/rcube_ldap.php @@ -871,6 +871,8 @@ class rcube_ldap extends rcube_addressbook // add required (non empty) fields filter $req_filter = ''; foreach ((array)$required as $field) { + if (in_array($field, (array)$fields)) // required field is already in search filter + continue; if ($attrs = $this->_map_field($field)) { if (count($attrs) > 1) $req_filter .= '(|';