Is your feature request related to a problem? Please describe.
Non-members and users without a bbPress forum role, e.g. spectator role, receive forum update emails for topics they've subscribed to previously.
Describe the solution you'd like
Non-members and users without a spectator role should not get forum emails for subscribed topics.
Describe alternatives you've considered
The user that requested this feature reported tweaking code from the bbPress Toolkit that seems abandoned as there has not been an update for this in the past 5 years.
Here's the example shared by them:
// Spectator users should NOT get an email to subscribed topics
// Waiting for https://bbpress.trac.wordpress.org/ticket/3046
function bbptoolkit_fltr_get_forum_subscribers( $user_ids ) {
if ( ! empty( $user_ids ) ) {
$new_user_ids = array();
foreach ( $user_ids as $uid ) {
if ( bbp_get_user_role( $uid ) != ‘bbp_spectator’ ) {
$new_user_ids[] = $uid;
}
}
return $new_user_ids;
} else {
return $user_ids;
}
};
// add the filter
add_filter( ‘bbp_forum_subscription_user_ids’, ‘bbptoolkit_fltr_get_forum_subscribers’, 10, 1 );
Additional context
Moderators: #502396
Is your feature request related to a problem? Please describe.
Non-members and users without a bbPress forum role, e.g. spectator role, receive forum update emails for topics they've subscribed to previously.
Describe the solution you'd like
Non-members and users without a spectator role should not get forum emails for subscribed topics.
Describe alternatives you've considered
The user that requested this feature reported tweaking code from the bbPress Toolkit that seems abandoned as there has not been an update for this in the past 5 years.
Here's the example shared by them:
Additional context
Moderators: #502396