Skip to content
Snippets Groups Projects
Commit 330e53e0 authored by Jared Hancock's avatar Jared Hancock
Browse files

oops: Better search hits for users

parent 20984faa
No related branches found
No related tags found
No related merge requests found
......@@ -35,8 +35,8 @@ class UsersAjaxAPI extends AjaxController {
$sql='SELECT DISTINCT user.id, email.address, name '
.' FROM '.USER_TABLE.' user '
.' JOIN '.USER_EMAIL_TABLE.' email ON user.id = email.user_id '
.' JOIN '.FORM_ENTRY_TABLE.' entry ON (entry.object_type=\'U\' AND entry.object_id = user.id)
JOIN '.FORM_ANSWER_TABLE.' value ON (value.entry_id=entry.id) '
.' LEFT JOIN '.FORM_ENTRY_TABLE.' entry ON (entry.object_type=\'U\' AND entry.object_id = user.id)
LEFT JOIN '.FORM_ANSWER_TABLE.' value ON (value.entry_id=entry.id) '
.' WHERE email.address LIKE \'%'.$escaped.'%\'
OR user.name LIKE \'%'.$escaped.'%\'
OR value.value LIKE \'%'.$escaped.'%\'
......
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