Opened 15 years ago
Closed 14 years ago
#2540 closed enhancement (fixed)
Add constant to allow disabling group auto join [HAS-PATCH]
Reported by: | boonebgorges | Owned by: | |
---|---|---|---|
Milestone: | 1.2.6 | Priority: | normal |
Severity: | Version: | ||
Component: | Groups | Keywords: | has-patch |
Cc: | boonebgorges@… |
Description
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)
Change History (6)
#2
@
15 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.
RE: http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/time-sensitive-how-to-prevent-auto-join-for-a-forumgroup-1/
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.