function og_group_child_nids in Organic groups 6.2
Same name and namespace in other branches
- 5.8 og.module \og_group_child_nids()
- 5 og.module \og_group_child_nids()
- 5.3 og.module \og_group_child_nids()
- 5.7 og.module \og_group_child_nids()
- 6 og.module \og_group_child_nids()
Return all node ids belonging to a group. No access control.
If you are retrieving for displaying, you may want to use an embedded View instead of this function.
1 call to og_group_child_nids()
- og_node_delete_confirm_submit in ./
og.module - Submit handler for node delete form. Handles deletes to group nodes.
File
- ./
og.module, line 1951 - Code for the Organic Groups module.
Code
function og_group_child_nids($group_nid) {
$result = db_query('SELECT oga.nid FROM {og_ancestry} oga WHERE oga.group_nid = %d', $group_nid);
$child_nids = array();
while ($row = db_fetch_object($result)) {
$child_nids[] = $row->nid;
}
return $child_nids;
}