You are here

function og_load in Organic groups 7

Load an Group entity from the database.

Parameters

$gid: The group ID.

$reset: Whether to reset the node_load_multiple cache.

Return value

A fully-populated group entity, or FALSE if none found.

15 calls to og_load()
OgGroupAudienceField::testOgAudienceFieldDeletedGroup in ./og.test
Test the group-audience field for a group that was deleted, but there are still users associated with that group.
OgMembership::group in ./og.module
Return the group assocaited with the group membership.
og_context_create_og_group in og_context/og_context.module
Return OG group form context.
og_context_determine_context in og_context/og_context.module
Determine the best matching context of a viewed page.
og_context_og_group_settings_form in og_context/og_context.module
OG group context settings form.

... See full list

File

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

Code

function og_load($gid, $reset = FALSE) {
  $group = og_load_multiple(array(
    $gid,
  ), array(), $reset);
  return $group ? reset($group) : FALSE;
}