You are here

function _groupmenu_get_user_group_ids in Group Menu 7

Gets an array of a members group ids.

Return value

array An array of the group ids that the user is a member of.

3 calls to _groupmenu_get_user_group_ids()
groupmenu_get_group_menus in ./groupmenu.module
Returns accessible menus for a given user or gids in a structured array.
groupmenu_node_form_validate in ./groupmenu.module
Validation handler for Group node forms.
groupmenu_node_prepare in ./groupmenu.module
Implements hook_node_prepare().

File

./groupmenu.module, line 868
Integrates menu with Group.

Code

function _groupmenu_get_user_group_ids() {
  global $user;
  $member_groups = group_load_by_member($user->uid);
  return array_keys($member_groups);
}