If you know when a user does this then if you install
bbP Toolkit
you can go to users>user>subscriptions and unassign them from all forums and topics with a couple of clicks
Robin, thank you very much for the reply.
We do have dozens and dozens of unsubscribes a week, sometimes more, due to the size of our community. It would take too much to adjust settings for users individually.
I did check out plugin. In description of plugin, it says “No email sending to blocked users”
This could be promising. I installed it but don’t see a setting for this feature. Maybe plugin does this automatically? I will try to find out from plugin author.
I was thinking I could give users I need to block a WP role in membership script such as “unsubscribe”
Then, I could easily set all these users to “blocked” as bbp role (through mass action). If emails don’t go out to blocked users, this might work.
ok let me look later to see if there is an easy filter we can apply
ok, this is untested for functionality, but doesn’t error
add_filter( 'bbp_get_topic_subscribers', 'rew_filter_subscrbers' );
add_filter( 'bbp_get_forum_subscribers', 'rew_filter_subscrbers' );
function rew_filter_subscribers ($users) {
$role = 'my_custom_role' ;
$filtered_ids = array();
foreach ( (array) $users as $user_id ) {
$user_info = get_userdata($user_id);
$user_roles = $user_info->roles ;
if (!in_array ($role, $user_roles)) {
array_push($filtered_IDs, $user_id);
}
}
return $filtered_ids ;
}
Do you know how to put this in to your child theme’s functions file?
If so you will need to change my_custom_role in this line
$role = 'my_custom_role' ;
to the role name that you are using
If you don’t know how to use functions file, then come back
I tested and it seems to work great. Thank you very much.
I think this will help greatly.