Closed (fixed)
Project:
Subgroups for Organic groups
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2009 at 08:53 UTC
Updated:
14 Mar 2011 at 22:11 UTC
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));
}
| Comment | File | Size | Author |
|---|---|---|---|
| og_subgroups.diff | 1.08 KB | ikogan |
Comments
Comment #1
YK85 commentedIs this still a problem? Does this patch fix the issue?
Comment #2
bschilt commentedI 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.
Comment #3
bschilt commentedComment #4
bschilt commentedI've committed a fix for this issue.