You are here

function og_membership_load in Organic groups 7

Same name and namespace in other branches
  1. 7.2 og.module \og_membership_load()

Group membership loader.

Parameters

$name: (optional) The name for this group membership. If no type is given all existing types are returned.

Return value

OgMembership Returns a fully-loaded group membership definition if a type name is passed. Else an array containing all types is returned.

1 call to og_membership_load()
og_get_group_membership in ./og.module
Get the group membership entity by User ID and group ID.

File

./og.module, line 1109
Enable users to create and manage groups with roles and permissions.

Code

function og_membership_load($id) {
  $result = entity_load('og_membership', array(
    $id,
  ));
  return $result ? reset($result) : FALSE;
}