Opened 11 years ago
Last modified 8 years ago
#2488 reopened defect (bug)
bbpress and buddypress groups - cancel forum and topic subscriptions when group is left by user
Reported by: | quan_flo | Owned by: | |
---|---|---|---|
Milestone: | 2.7 | Priority: | normal |
Severity: | normal | Version: | 2.5.1 |
Component: | API - Subscriptions | Keywords: | has-patch |
Cc: | trisha@…, vivek@…, kealanf@…, jjjay@… |
Description
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.
In case of private groups this also might be a privacy problem. A non-member (or no-longer-member) might have access to private content if other users reply on topics or create content inside the group forum if the no-longer-member still has a sinscroiption to the forum / a topic.
(I use latest bbpress version. It seems as if the "version" dropdown does not contain the actual versions?)
Attachments (4)
Change History (27)
#7
@
10 years ago
- Cc kealanf@… added
This defect is still active and is a big hole in the way my site runs. Any possibility this can be patched before 2.6?
This ticket was mentioned in Slack in #bbpress by tharsheblows. View the logs.
10 years ago
#9
follow-up:
↓ 10
@
10 years ago
- Cc jjjay@… added
There is a patch for this in buddypress:#6020 - let me know if that's not what was supposed to happen...
#10
in reply to:
↑ 9
@
10 years ago
- Resolution set to fixed
- Status changed from new to closed
Replying to tharsheblows:
There is a patch for this in buddypress:#6020 - let me know if that's not what was supposed to happen...
Thank you for patching this! I should've guessed that you guys at Buddypress would be working on this as the groups functionality isn't exactly core bbpress...
(I've marked this as fixed, but I'm still new to trac so please undo that if it's not the right protocol)
#11
@
10 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Reopened: this issue needs patching in bbPress, not buddypress
see https://buddypress.trac.wordpress.org/ticket/6020#comment:3 for patch and discussion
#12
@
10 years ago
Here is a patch -- fourth, fifth time's the charm, we'll see.
If someone leaves / is banned / is removed from a group, should the forum and topics be unfavorited also?
#13
@
10 years ago
I would vote yes. If the user isn't affiliated with that group anymore, why should traces remain in their "my account". Definitely for hidden/private groups.
Thank you for all the work you've done on this, really appreciated.
This ticket was mentioned in Slack in #bbpress by netweb. View the logs.
10 years ago
#15
@
10 years ago
On the other hand, if someone is banned by mistake or temporarily, it doesn't seem fair that they lose all their favorites/subscriptions.
#16
@
10 years ago
I think make it filterable so that the defaults work for most people but it's possible to change them if you want (if possible).
But favorites should go as subscriptions, right? I mean in a given situation, if subscriptions are removed, favorites should be removed too. I think that makes sense? It's a bit strange and unintuitive otherwise.
#17
follow-up:
↓ 19
@
10 years ago
Complete agree - they should both go. It doesn't make sense for favs to stay if subs are going.
@sooskriszta The action of banning should have these consequences. If the ban was mistaken that's the admins fault. If it's temporary they should start again freshly when they're un-banned.
#18
@
10 years ago
- Keywords has-patch added
First go (second go?) - let me know if and when it fails. There is a filter in there so you can change what happens when an action (leave / remove / ban) is taken. Subscriptions and favorites go (or stay) together.
By default, everything is unfavorited and unsubscribed when someone leaves or gets banned or removed. True means "unsubscribe and unfavorite", false means "leave as is" -- eg 'ban_public' => true means if someone is banned from a public group, they will be unsubscribed and their favorites will be removed.
$defaults = array( 'leave_hidden' => true, 'leave_private' => true, 'leave_public' => true, 'remove_hidden' => true, 'remove_private' => true, 'remove_public' => true, 'ban_hidden' => true, 'ban_private' => true, 'ban_public' => true );
You can filter this eg:
function unsub_filter(){ return array( 'remove_public' => false, 'ban_public' => false ); } add_filter( 'bbp_before_group_unsubscribe_parse_args', 'unsub_filter' );
#19
in reply to:
↑ 17
@
10 years ago
Replying to tharsheblows:
But favorites should go as subscriptions, right? I mean in a given situation, if subscriptions are removed, favorites should be removed too. I think that makes sense? It's a bit strange and unintuitive otherwise.
Agree 100%
Replying to kjf9:
@sooskriszta The action of banning should have these consequences. If the ban was mistaken that's the admins fault.
Yes, it would be admin's fault. And we know that people do make mistakes. Good software is fairly fault-tolerant.
If it's temporary they should start again freshly when they're un-banned.
That seems a bit harsh.
This ticket was mentioned in Slack in #bbpress by thebrandonallen. View the logs.
9 years ago
#21
@
9 years ago
Refresh patch and add tests. The tests were loads of fun to write. They failed... a lot... for reasons I gave up trying to figure out. Running a backtrace inside of a test was the zenith of the fun for me.
#22
@
9 years ago
Refreshed patch for trunk. PHPDoc fixes.
2488.3.patch and earlier patches used a complicated array structure to determine if a user should be unsubscribed from a group, in a particular situation. This, however, didn't allow you to easily change this for a specific group or user.
New patch replaces all of this with a single filter that allows developers to short-circuit the unsubscribe/unfavorite process on a granular level.
Tests have been updated to reflect this change.
That's probably a good idea. Let's consider this in 2.6.
I'll make a version for 2.5. Sorry about that.