function _spaces_og_enforce_privacy in Spaces 6.3
Same name and namespace in other branches
- 7.3 spaces_og/spaces_og.module \_spaces_og_enforce_privacy()
- 7 spaces_og/spaces_og.module \_spaces_og_enforce_privacy()
Enforces OG group and privacy settings on a node.
1 call to _spaces_og_enforce_privacy()
- spaces_og_nodeapi in spaces_og/
spaces_og.module - Implementation of hook_nodeapi().
File
- spaces_og/
spaces_og.module, line 452
Code
function _spaces_og_enforce_privacy($gid, &$node) {
if ($group = node_load($gid)) {
if ($group->og_private) {
$node->og_public = OG_VISIBLE_GROUPONLY;
}
else {
$node->og_public = OG_VISIBLE_BOTH;
}
$node->og_groups = array(
$gid => $gid,
);
return TRUE;
}
return FALSE;
}