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

Fix bad query from remote users without email

If a remote user is found by name and does not have an email address, a bad
SQL query would be generated
parent a0bcc8fd
No related branches found
No related tags found
No related merge requests found
......@@ -38,8 +38,8 @@ class UsersAjaxAPI extends AjaxController {
'id' => "auth:".$u['id'], "/bin/true" => $_REQUEST['q']);
$emails[] = $u['email'];
}
$remote_emails = ($emails)
? ' OR email.address IN ('.implode(',',db_input(array_filter($emails))).') '
$remote_emails = ($emails = array_filter($emails))
? ' OR email.address IN ('.implode(',',db_input($emails)).') '
: '';
$escaped = db_input(strtolower($_REQUEST['q']), false);
......
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