aboutsummaryrefslogtreecommitdiff
path: root/pages/members/search.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/members/search.php')
-rw-r--r--pages/members/search.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/pages/members/search.php b/pages/members/search.php
new file mode 100644
index 000000000..1a0168660
--- /dev/null
+++ b/pages/members/search.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Members search page
+ *
+ */
+
+if ($vars['search_type'] == 'tag') {
+ $tag = get_input('tag');
+
+ $title = elgg_echo('members:title:searchtag', array($tag));
+ $content = elgg_view_title($title);
+
+ $options = array();
+ $options['query'] = $tag;
+ $options['type'] = "user";
+ $options['offset'] = $offset;
+ $options['limit'] = $limit;
+ $results = elgg_trigger_plugin_hook('search', 'tags', $options, array());
+ $count = $results['count'];
+ $users = $results['entities'];
+ $content .= elgg_view_entity_list($users, $count, $offset, $limit, false, false, true);
+} else {
+ $name = get_input('name');
+
+ $title = elgg_echo('members:title:searchname', array($name));
+ $content = elgg_view_title($title);
+
+ elgg_set_context('search');
+ $content .= list_user_search($name);
+}
+
+$params = array(
+ 'body' => $content,
+ 'sidebar' => elgg_view('core/members/sidebar'),
+);
+
+$body = elgg_view_layout('one_sidebar', $params);
+
+echo elgg_view_page($title, $body);