Skip to content
Snippets Groups Projects
Unverified Commit a80ee743 authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #4471 from JediKev/issue/cdata-phone-contains

issue: CDATA Phone Contains
parents a196fbd3 e9214c2e
No related branches found
No related tags found
No related merge requests found
......@@ -10,13 +10,15 @@ $users = User::objects()
if ($_REQUEST['query']) {
$search = $_REQUEST['query'];
$users->filter(Q::any(array(
$filter = Q::any(array(
'emails__address__contains' => $search,
'name__contains' => $search,
'org__name__contains' => $search,
'cdata__phone__contains' => $search,
// TODO: Add search for cdata
)));
));
if (UserForm::getInstance()->getField('phone'))
$filter->add(array('cdata__phone__contains' => $search));
$users->filter($filter);
$qs += array('query' => $_REQUEST['query']);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment