diff options
Diffstat (limited to 'phpBB/memberlist.php')
| -rw-r--r-- | phpBB/memberlist.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index d2ba27559c..748b2548c9 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -983,7 +983,6 @@ switch ($mode) case 'livesearch': $username_chars = $request->variable('q', '', true); - $hint = ""; $sql = 'SELECT username, user_id FROM ' . USERS_TABLE . ' @@ -991,17 +990,17 @@ switch ($mode) AND username ' . $db->sql_like_expression($username_chars . $db->any_char); $result = $db->sql_query_limit($sql, 10); + $user_list = array(); $i = 1; while ($row = $db->sql_fetchrow($result)) { $j = ($i%2)+1; - $hint.= "<tr class='bg".$j." row".$j."'><td><a href='" . - $phpbb_root_path."memberlist.$phpEx". "?mode=viewprofile&u=" . $row['user_id'] . - "' target='_blank'>" . - $row['username'] . "</a></td></tr>"; + $user_list[] = array("id" => $row['user_id'], "name" => $row['username']); $i++; } - echo $hint; + + $json_response = new \phpbb\json_response(); + echo $json_response->send($user_list); exit(); break; |
