--- roundcubemail-1.2.3/program/lib/Roundcube/rcube_ldap.php.orig 2016-12-08 09:38:47.093571869 -0500 +++ roundcubemail-1.2.3/program/lib/Roundcube/rcube_ldap.php 2016-12-08 09:42:00.418941049 -0500 @@ -924,7 +924,7 @@ class rcube_ldap extends rcube_addressbo // add general filter to query if (!empty($this->prop['filter'])) { - $prop['filter'] = '(&(' . preg_replace('/^\(|\)$/', '', $this->prop['filter']) . ')' . $prop['filter'] . ')'; + $prop['filter'] = '(&(' . preg_replace('/^\(|\)$/', '', array_key_exists('adv_filter', $this->prop) ? $this->prop['adv_filter'] : $this->prop['filter']) . ')' . $prop['filter'] . ')'; } }