function _spaces_og_enforce_privacy in Spaces 7
Same name and namespace in other branches
- 6.3 spaces_og/spaces_og.module \_spaces_og_enforce_privacy()
- 7.3 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_OLD in spaces_og/
spaces_og.module - Implements 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;
}