From 781700ea6d64e55abd9114024cb88ea7b8b4a606 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 18 Feb 2019 14:04:36 +0100 Subject: [PATCH] Better approach to query existing contacts --- api/src/Etemplate/Widget/Url.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Etemplate/Widget/Url.php b/api/src/Etemplate/Widget/Url.php index 73352b1aed..39306aec86 100644 --- a/api/src/Etemplate/Widget/Url.php +++ b/api/src/Etemplate/Widget/Url.php @@ -137,8 +137,8 @@ class Url extends Etemplate\Widget public static function ajax_contact($_email) { $email = \EGroupware\Api\Mail::stripRFC822Addresses(array($_email)); - $result = $GLOBALS['egw']->contacts->search($email[0], array('email','email_home'), - '', '', '', false, 'OR', false, array('cols_to_search' => array('email','email_home'))); + $result = $GLOBALS['egw']->contacts->search(array('contact_email'=>$email[0], 'contact_email_home' => $email[0]), array('email','email_home'), + '', '', '', false, 'OR', false); \EGroupware\Api\Json\Response::data($result ? true : false); } }