diff --git a/api/src/Contacts.php b/api/src/Contacts.php index 63a7b088ac..ede6f5cc36 100755 --- a/api/src/Contacts.php +++ b/api/src/Contacts.php @@ -2869,6 +2869,10 @@ class Contacts extends Contacts\Storage $pattern = $backend->search2criteria($pattern, $wildcard, $op, null, (array)$fields_to_search, false); } + else + { + $filter['cols_to_search'] = $fields_to_search; + } $rows = parent::search($pattern, $only_keys, $order_by, $extra_cols, $wildcard, $empty, $op, $start, $filter, $join, $ignore_acl) ?: []; foreach($rows as $key => $row) {