diff options
Diffstat (limited to 'mod/groups/lib')
-rw-r--r-- | mod/groups/lib/groups.php | 40 |
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 |