1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-29 18:50:25 +02:00

Merge branch '3.3.x'

This commit is contained in:
Marc Alexander 2021-07-15 22:02:11 +02:00
commit 32543c40ba
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -979,23 +979,26 @@ switch ($mode)
WHERE ' . $db->sql_in_set('user_type', $user_types) . '
AND username_clean ' . $db->sql_like_expression(utf8_clean_string($username_chars) . $db->get_any_char());
$result = $db->sql_query_limit($sql, 10);
$user_list = array();
$user_list = [];
while ($row = $db->sql_fetchrow($result))
{
$user_list[] = array(
$user_list[] = [
'user_id' => (int) $row['user_id'],
'result' => $row['username'],
'result' => htmlspecialchars_decode($row['username']),
'username_full' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
'display' => get_username_string('no_profile', $row['user_id'], $row['username'], $row['user_colour']),
);
];
}
$db->sql_freeresult($result);
$json_response = new \phpbb\json_response();
$json_response->send(array(
$json_response->send([
'keyword' => $username_chars,
'results' => $user_list,
));
]);
break;