aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/lib
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-22 22:22:33 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-22 22:22:33 +0000
commit24378b3ecc07eb568e383823967a0ae6378120d6 (patch)
tree58883ec4eca3aa6c73e17da5267efc4dc3315238 /mod/groups/lib
parent1c1956e48cc29e358563e24dc73a18bf84e50889 (diff)
downloadelgg-24378b3ecc07eb568e383823967a0ae6378120d6.tar.gz
elgg-24378b3ecc07eb568e383823967a0ae6378120d6.tar.bz2
Fixes #2295 added a group member list page
git-svn-id: http://code.elgg.org/elgg/trunk@7906 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/lib')
-rw-r--r--mod/groups/lib/groups.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php
index 426d67c86..cb9daf8e9 100644
--- a/mod/groups/lib/groups.php
+++ b/mod/groups/lib/groups.php
@@ -248,6 +248,46 @@ function groups_handle_activity_page($guid) {
}
/**
+ * Group members page
+ *
+ * @param int $guid Group entity GUID
+ */
+function groups_handle_members_page($guid) {
+
+ elgg_set_page_owner_guid($guid);
+
+ $group = get_entity($guid);
+ if (!$group || !elgg_instanceof($group, 'group')) {
+ forward();
+ }
+
+ group_gatekeeper();
+
+ $title = elgg_echo('groups:members:title', array($group->name));
+
+ elgg_push_breadcrumb($group->name, $group->getURL());
+ elgg_push_breadcrumb(elgg_echo('groups:members:'));
+
+ $content = elgg_list_entities_from_relationship(array(
+ 'relationship' => 'member',
+ 'relationship_guid' => $group->guid,
+ 'inverse_relationship' => true,
+ 'types' => 'user',
+ 'limit' => 20,
+ ));
+
+ $params = array(
+ 'content' => $content,
+ 'title' => $title,
+ 'buttons' => '',
+ 'filter' => '',
+ );
+ $body = elgg_view_layout('content', $params);
+
+ echo elgg_view_page($title, $body);
+}
+
+/**
* Invite users to a group
*
* @param int $guid Group entity GUID