From d976e590c92857b3fc1b162a0210310403b2820f Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 17 Dec 2018 12:11:02 -0500 Subject: [PATCH] dev/core#593 - Fix quicksearch by email --- api/v3/Contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v3/Contact.php b/api/v3/Contact.php index a5b0a284db..07913f9001 100644 --- a/api/v3/Contact.php +++ b/api/v3/Contact.php @@ -957,7 +957,7 @@ function civicrm_api3_contact_getquick($params) { $customOptionsWhere = $customOptionsWhere ?: [0]; $whereClause = " WHERE (" . implode(' OR ', $customOptionsWhere) . ") $where"; } - elseif (!empty($params['field_name']) && !empty($params['table_name'])) { + elseif (!empty($params['field_name']) && !empty($params['table_name']) && $params['field_name'] != 'sort_name') { $whereClause = " WHERE ( $table_name.$field_name LIKE '$strSearch') {$where}"; // Search by id should be exact if ($field_name == 'id' || $field_name == 'external_identifier') { -- 2.25.1