You are here

function group_membership_load in Group 7

Load a group membership by group and user id.

Parameters

int $gid: The group id to load the membership for.

int $uid: The user id to load the membership for.

Return value

GroupMembership The loaded GroupMembership entity.

3 calls to group_membership_load()
ggroup_run_member_inheritance in modules/ggroup/ggroup.module
Trigger the inheritance downwards for a membership.
gprofile_load in modules/gprofile/helpers/gprofile.entity.inc
Load a group member profile.
Group::getMember in classes/group.inc
Get a single member of a group.

File

helpers/group_membership.entity.inc, line 49
Entity API related helper functions for group memberships.

Code

function group_membership_load($gid, $uid) {
  $group_memberships = group_memberships(array(
    'gid' => $gid,
    'uid' => $uid,
  ));
  return reset($group_memberships);
}