Skip to content

Instantly share code, notes, and snippets.

@thomasv314
Created November 20, 2012 18:15
Show Gist options
  • Save thomasv314/4119775 to your computer and use it in GitHub Desktop.
Save thomasv314/4119775 to your computer and use it in GitHub Desktop.
diff --git a/og_forum_D7/og_forum.module b/og_forum_D7/og_forum.module
index aafa92b..ab33bd5 100644
--- a/og_forum_D7/og_forum.module
+++ b/og_forum_D7/og_forum.module
@@ -171,12 +171,12 @@ function og_forum_node_access($node, $op, $account) {
$node_group = og_get_entity_groups('node', $node);
$access = NODE_ACCESS_DENY;
- if (count($node_group) == 0) {
+ if (count($node_group['node']) == 0) {
return NODE_ACCESS_ALLOW;
}
- foreach ($node_group as $gid) {
- if (in_array($gid, $user_group)) {
+ foreach ($node_group['node'] as $gid) {
+ if (in_array($gid, $user_group['node'])) {
$access = NODE_ACCESS_ALLOW;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment