mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
Better approach to query existing contacts
This commit is contained in:
parent
a443acf53f
commit
8a89ce0815
@ -137,8 +137,8 @@ class Url extends Etemplate\Widget
|
|||||||
public static function ajax_contact($_email)
|
public static function ajax_contact($_email)
|
||||||
{
|
{
|
||||||
$email = \EGroupware\Api\Mail::stripRFC822Addresses(array($_email));
|
$email = \EGroupware\Api\Mail::stripRFC822Addresses(array($_email));
|
||||||
$result = $GLOBALS['egw']->contacts->search($email[0], 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, array('cols_to_search' => array('email','email_home')));
|
'', '', '', false, 'OR', false);
|
||||||
\EGroupware\Api\Json\Response::data($result ? true : false);
|
\EGroupware\Api\Json\Response::data($result ? true : false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user