Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 12 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:
Priority: normal Milestone:
Component: Forums Version:
Severity: normal 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)

6020.diff​ (5.5 KB ) - added by tharsheblows 12 years ago.
first go at auto unsub to forum/topics when leaving groups
6020.1.diff​ (4.8 KB ) - added by tharsheblows 12 years ago.
fixing message to be translatable in bp-group-actions
6020.2.diff​ (599 bytes ) - added by tharsheblows 12 years ago.
adds 'groups_leave_group' action

Download all attachments as: .zip

Change History (11)

@tharsheblows
12 years ago

first go at auto unsub to forum/topics when leaving groups

@tharsheblows
12 years ago

fixing message to be translatable in bp-group-actions

#1 @tharsheblows
12 years ago

  • Cc jjjay@… added

#2 @kjf9
12 years ago

  • Cc kealanf@… added

#3 @r-a-y
12 years ago

  • Keywords has-patch removed
  • Milestone Awaiting Review
  • Resolution → invalid
  • Status new → 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 /includes/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

Last edited 12 years ago by r-a-y (previous) (diff)

#5 @tharsheblows
12 years ago

  • Resolution invalid
  • Status closed → 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.

@tharsheblows
12 years ago

adds 'groups_leave_group' action

#6 @r-a-y
12 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 @tharsheblows
12 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 @r-a-y
12 years ago

  • Resolution → invalid
  • Status reopened → 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.

Note: See TracTickets for help on using tickets.