function _comment_og_allow_nonmember_access in Comment OG 6
Determine if a group's comments are only restricted to members.
Parameters
$nid: The node id of group node whose comment access should be checked.
Return value
TRUE if nonmembers may post comments in the specified group. FALSE otherwise.
2 calls to _comment_og_allow_nonmember_access()
- comment_og_access in ./
comment_og.module - Determine if comments may be posted by the active user to the given group.
- comment_og_form_alter in ./
comment_og.module
File
- ./
comment_og.module, line 169
Code
function _comment_og_allow_nonmember_access($nid) {
/*
* No row for this group node results in non-TRUE return value,
* which would be the same as having a row inserted with the default
* value.
*/
return (bool) db_result(db_query('SELECT grant_nonmember_access FROM {comment_og_node} con WHERE con.nid = %d', $nid));
}