Opened 10 years ago
Closed 10 years ago
#6020 closed defect (bug) (no action required)
bbpress and buddypress groups - cancel forum and topic subscriptions when group is left by user
Reported by: | tharsheblows | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Forums | Keywords: | |
Cc: | jjjay@…, kealanf@… |
Description
This relates to bbpress:#2488 :
When a user leaves a group, the subscriptions of the buddypress group forum remain.
Maybe you can add an action that all forum AND topics subscriptions from the buddypress group forum are removed when a user leaves a group.
This should unsubscribe users from all group topics and forums when:
- leaving a group
- banned from a group
- removed from a group
Attachments (3)
Change History (11)
#3
@
10 years ago
- Keywords has-patch removed
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
Thanks for the patch, tharsheblows.
However, this should be handled in the bbPress plugin and not BuddyPress since you are specifically using bbPress functions inside the core BuddyPress plugin.
You should probably patch /extend/buddypress/groups.php
in bbPress. To hook onto the group leave action, use the 'groups_leave_group'
action:
https://buddypress.trac.wordpress.org/browser/tags/2.1.1/src/bp-groups/bp-groups-functions.php#L372
#4
@
10 years ago
bbPress ticket here:
https://bbpress.trac.wordpress.org/ticket/2488
#5
@
10 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
Oops, didn't know that was not on! The 'groups_leave_group' action (or another we could use) isn't in https://buddypress.trac.wordpress.org/browser/tags/2.1.1/src/bp-groups/bp-groups-actions.php#L389 so here's a patch for that. The rest will be in bbPress.
#6
@
10 years ago
2.diff
shouldn't be necessary since the 'groups_leave_group'
action should run for people who successfully leave the group.
Please test your code first and if the hook isn't running, we'll look to add it in.
#7
@
10 years ago
You're right! Sorry about that and thanks for your help. I haven't put the patch up on bbPress yet because I wanted to ask if it should unfavorite them too. I would think so but want to check!
#8
@
10 years ago
- Resolution set to invalid
- Status changed from reopened to closed
I haven't put the patch up on bbPress yet because I wanted to ask if it should unfavorite them too. I would think so but want to check!
I would say remove the favorite if the forum is private or hidden since the user will not have access to the forum any more. Might want to get other people's opinions on bbPress Trac though.
Thanks for working on the patch!
Going to mark this ticket as invalid.
first go at auto unsub to forum/topics when leaving groups