From 2676da24e1f132ded78d2ab2f4138fae6d38f7d1 Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 3 Jul 2008 15:45:28 +0000 Subject: It would help if I added the functions to the right scope. Oops! Refs #106 git-svn-id: https://code.elgg.org/elgg/trunk@1275 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/group.php | 98 ++++++++++++++++++++++++++-------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) (limited to 'engine/lib/group.php') diff --git a/engine/lib/group.php b/engine/lib/group.php index db8f3227c..f47f88bff 100644 --- a/engine/lib/group.php +++ b/engine/lib/group.php @@ -498,54 +498,54 @@ $total = get_data_row($query); return $total->total; } - - /** - * Return a list of this group's members. - * - * @param int $group_guid The ID of the container/group. - * @param int $limit The limit - * @param int $offset The offset - * @param int $site_guid The site - * @param bool $count Return the users (false) or the count of them (true) - * @return mixed - */ - function get_group_members($group_guid, $limit = 10, $offset = 0, $site_guid = 0, $count = false) - { - return get_entities_from_relationship('member', $group_guid, true, 'user', '', 0, "", $limit, $offset, $count, $site_guid); - } - - /** - * Return whether a given user is a member of the group or not. - * - * @param int $group_guid The group ID - * @param int $user_guid The user guid - * @return bool - */ - function is_group_member($group_guid, $user_guid) - { - return check_entity_relationship($user_guid, 'member', $group_guid); - } - - /** - * Join a user to a group. - * - * @param int $group_guid The group. - * @param int $user_guid The user. - */ - function join_group($group_guid, $user_guid) - { - return add_entity_relationship($user_guid, 'member', $group_guid); - } - - /** - * Remove a user from a group. - * - * @param int $group_guid The group. - * @param int $user_guid The user. - */ - function leave_group($group_guid, $user_guid) - { - return remove_entity_relationship($user_guid, 'member', $group_guid); - } + } + + /** + * Return a list of this group's members. + * + * @param int $group_guid The ID of the container/group. + * @param int $limit The limit + * @param int $offset The offset + * @param int $site_guid The site + * @param bool $count Return the users (false) or the count of them (true) + * @return mixed + */ + function get_group_members($group_guid, $limit = 10, $offset = 0, $site_guid = 0, $count = false) + { + return get_entities_from_relationship('member', $group_guid, true, 'user', '', 0, "", $limit, $offset, $count, $site_guid); + } + + /** + * Return whether a given user is a member of the group or not. + * + * @param int $group_guid The group ID + * @param int $user_guid The user guid + * @return bool + */ + function is_group_member($group_guid, $user_guid) + { + return check_entity_relationship($user_guid, 'member', $group_guid); + } + + /** + * Join a user to a group. + * + * @param int $group_guid The group. + * @param int $user_guid The user. + */ + function join_group($group_guid, $user_guid) + { + return add_entity_relationship($user_guid, 'member', $group_guid); + } + + /** + * Remove a user from a group. + * + * @param int $group_guid The group. + * @param int $user_guid The user. + */ + function leave_group($group_guid, $user_guid) + { + return remove_entity_relationship($user_guid, 'member', $group_guid); } ?> \ No newline at end of file -- cgit v1.2.3