function opigno_og_access_node_update in Opigno 7
File
- modules/
opigno_og_access/ opigno_og_access.module, line 239 - Enable access control for private and public groups and group content.
Code
function opigno_og_access_node_update($node) {
$loaded_node = node_load($node->nid, NULL, TRUE);
if ($loaded_node->type == "course" || $loaded_node->type == "class") {
$content = opigno_og_group_get_contents_in_group($loaded_node->nid);
while ($record = $content
->fetchAssoc()) {
$nd = node_load($record['nid']);
node_access_acquire_grants($nd, TRUE);
}
}
}