From 6854cb3f4d8219cf1829e32122eb2502a916eae9 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 1 Feb 2020 09:05:48 +0100 Subject: initial checkin --- js/callbacks/usersearch.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 js/callbacks/usersearch.php (limited to 'js/callbacks/usersearch.php') diff --git a/js/callbacks/usersearch.php b/js/callbacks/usersearch.php new file mode 100644 index 0000000..a17833d --- /dev/null +++ b/js/callbacks/usersearch.php @@ -0,0 +1,45 @@ +check_account_ok(); +} else { + $user = new User(0, $proj); +} + +// don't allow anonymous users to access this page at all +if ($user->isAnon()) { + die(); +} +$first = reset($_POST); +if (is_array($first)) { + $first = reset($first); +} +$searchterm = '%' . $first . '%'; + +// Get the list of users from the global groups above +$get_users = $db->query('SELECT real_name, user_name, profile_image + FROM {users} u + WHERE u.user_name LIKE ? OR u.real_name LIKE ?', + array($searchterm, $searchterm), 20); + +$html = ''; + +echo $html; + +?> -- cgit v1.2.3-70-g09d2