Skip to:

Opened 14 years ago

Closed 14 years ago

#2540 closed enhancement (fixed)

Add constant to allow disabling group auto join [HAS-PATCH]

Reported by: boonebgorges's profile boonebgorges Owned by:
Milestone: 1.2.6 Priority: normal
Severity: Version:
Component: Groups Keywords: has-patch
Cc: boonebgorges@…


When a non-member of a public group posts to that group's forum, they're auto-joined. Until such a time when and if BP forums are rewritten, it'd be nice to have an action hook that could be used to reverse this process. Should be quite harmless, so I hope it can get put into 1.2.6.

Attachments (2)

new_hooks_after_auto_group_join.patch (2.5 KB) - added by boonebgorges 14 years ago.
disable_auto_join_constant.patch (3.1 KB) - added by boonebgorges 14 years ago.

Download all attachments as: .zip

Change History (6)

#1 @DJPaul
14 years ago


groups_join_group happens first and then the patch/bp-custom.php calls groups_leave_group after. This feels a bit hackish as you're sending another database query (and essentially wasting the first one). However, I can't see any negative consequence with this patch as it'd be up to individual site admins to add code to call groups_leave_group if they wanted to do that.

#2 @boonebgorges
14 years ago

  • Cc boonebgorges@… added
  • Summary changed from Additional hooks during posting to group forum [HAS-PATCH] to Add constant to allow disabling group auto join [HAS-PATCH]

Good call, Paul.

I probably should have slept on this one. I didn't look into how group forum posting worked, assuming that it would require a lot of messing around to remove the group membership requirement on forum posting. But there isn't really any, from the individual member point of view.

The second patch (disable_auto_join_constant.patch) does it the right way and avoids the extra queries.

#3 @r-a-y
14 years ago

Second patch is much cleaner ;)

#4 @johnjamesjacoby
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3178]) Fixes #2540 props boonebgorges

Note: See TracTickets for help on using tickets.