In the documentation for the function og_is_member (http://drupalcontrib.org/api/drupal/contributions%21og%21og.module/funct...) the documentation doesn't mention the first parameter at all: $group_type. I was confused and flummoxed by this.

I propose it be updated to:

/**
 * Return TRUE if entity belongs to a group.
 *
 * @param $group_type
 *   The entity type of the group.
 * @param $gid
 *   The group ID.
 * @param $entity_type
 *   The entity type.
 * @param $entity
 *   The entity object. If empty the current user will be used.
 * @param $states
 *   Optional; Array with the state to return. If empty groups of all state will
 *   return.
 *
 * @return
 *   TRUE if the entity (e.g. the user) belongs to a group and is not pending or
 *   blocked.
 */
function og_is_member($group_type, $gid, $entity_type = 'user', $entity = NULL, $states = array(OG_STATE_ACTIVE))

Comments

shushu’s picture

Version: 7.x-2.7 » 7.x-2.x-dev
Status: Active » Closed (fixed)
blainelang’s picture

Status: Closed (fixed) » Needs work

The document page has not been updated and still does not explain group_type in the parameters. It would be nice to see a real example as well.

jacob.embree’s picture