If you have OG setup to require approval for membership to groups and a user applies for membership for a subgroup then that user immediately becomes a member of the parent group, without requiring any sort of approval.

--- og_subgroups.module.old     2009-10-21 04:49:40.587976453 -0400
+++ og_subgroups.module 2009-10-21 04:49:33.131382429 -0400
@@ -216,7 +216,8 @@
         // 1) User isn't a member;
         // 2) or Admin propagation, and member isn't admin;
         // 3) or Admin demotion and user is member of the group.
-        elseif (!og_is_group_member($group_nid, TRUE, $account->uid) || ($is_admin && !$account->og_groups[$group_nid]['is_admin']) || (!empty($account->og_groups[$group_nid]['is_admin']) && !$args['is_admin'] && $demote['remove_admin'])) {
+        // 4) and registration has been approved
+        elseif ($args['is_active'] == 1 && (!og_is_group_member($group_nid, TRUE, $account->uid) || ($is_admin && !$account->og_groups[$group_nid]['is_admin']) || (!empty($account->og_groups[$group_nid]['is_admin']) && !$args['is_admin'] && $demote['remove_admin']))) {
           // Pass in the $args info about propagation done by og_subgroups module.
           og_save_subscription($group_nid, $uid, array('is_active' => 1, 'is_admin' => $is_admin, 'og_subgroups' => TRUE));
         }
CommentFileSizeAuthor
og_subgroups.diff1.08 KBikogan

Comments

YK85’s picture

Version: 6.x-0.x-dev » 6.x-1.x-dev

Is this still a problem? Does this patch fix the issue?

bschilt’s picture

I will need a new patch submitted since the current 6.x-1.x branch was ported from the 5.4 branch and the base code is different.

bschilt’s picture

Status: Needs review » Active
bschilt’s picture

Status: Active » Fixed

I've committed a fix for this issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.