forked from extern/egroupware
Strip RFC822 email to avoid search contacts other than email itself. Fix issue sometimes add as new contact not showing up because it takes it as existing contact.
This commit is contained in:
parent
e5c13a0df6
commit
d89247fdf3
@ -132,11 +132,12 @@ class Url extends Etemplate\Widget
|
||||
/**
|
||||
* Handle ajax searches for existing contact based on email
|
||||
*
|
||||
* @return boolean email exists or not
|
||||
* @return boolean $_email exists or not
|
||||
*/
|
||||
public static function ajax_contact($email)
|
||||
public static function ajax_contact($_email)
|
||||
{
|
||||
$result = $GLOBALS['egw']->contacts->search($email);
|
||||
$email = \EGroupware\Api\Mail::stripRFC822Addresses(array($_email));
|
||||
$result = $GLOBALS['egw']->contacts->search($email[0]);
|
||||
|
||||
\EGroupware\Api\Json\Response::data($result ? true : false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user