diff --git a/controller/helper.php b/controller/helper.php index 4d9257f5a..a18e819c1 100644 --- a/controller/helper.php +++ b/controller/helper.php @@ -183,8 +183,14 @@ protected function check_column_disabled($row) */ protected function check_group_access($row) { + if (!function_exists('group_memberships')) + { + include(realpath($this->path_helper->get_phpbb_root_path()) . '/includes/functions_user' . $this->php_ext); + } + $group_ary = (!empty($row['module_group_ids'])) ? explode(',', $row['module_group_ids']) : ''; - if ((is_array($group_ary) && !in_array($this->user->data['group_id'], $group_ary))) + $memberships = group_memberships($group_ary ,$this->user->data['user_id']); + if (is_array($group_ary) && empty($memberships)) { return false; }