function _opigno_og_access_node_access in Opigno 7
1 call to _opigno_og_access_node_access()
- opigno_og_access_node_access_records in modules/
opigno_og_access/ opigno_og_access.module - Implements hook_node_access_records().
File
- modules/
opigno_og_access/ opigno_og_access.module, line 130 - Enable access control for private and public groups and group content.
Code
function _opigno_og_access_node_access($wrapper) {
if (empty($wrapper->{OG_ACCESS_FIELD})) {
return TRUE;
}
$wrapper = entity_metadata_wrapper('node', $wrapper);
if ($wrapper->{OG_ACCESS_FIELD}
->value() == 0 || $wrapper->{OG_ACCESS_FIELD}
->value() == 1) {
return TRUE;
}
return FALSE;
}