Created
November 20, 2012 18:15
-
-
Save thomasv314/4119775 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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