You are here

function og_load_group in Organic groups 6.2

Same name and namespace in other branches
  1. 5.8 og.module \og_load_group()
  2. 5 og.module \og_load_group()
  3. 5.2 og.module \og_load_group()
  4. 5.3 og.module \og_load_group()
  5. 5.7 og.module \og_load_group()
  6. 6 og.module \og_load_group()

On node load of a group, add group-specific data.

Parameters

$node: Reference to group node.

2 calls to og_load_group()
og_access_alter_nongroup_form in modules/og_access/og_access.module
og_nodeapi in ./og.module
Implementation of hook_nodeapi().

File

./og.module, line 1509
Code for the Organic Groups module.

Code

function og_load_group(&$node) {
  $sql = 'SELECT * FROM {og} WHERE nid = %d';
  $result = db_query($sql, $node->nid);
  $node = (object) array_merge((array) $node, (array) db_fetch_array($result));
}