Thanks, I took a second look at this and I put a filter into my style pack plugin a while ago to stop blocked users getting emails as bbpress does not do this.
If you want to do this directly, add this to your functions file
function rew_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_blocked') {
$new_user_ids[] = $uid;
}
}
return $new_user_ids;
} else {
return $user_ids;
}
};
// add the filter
if(!function_exists('bbptoolkit_fltr_get_forum_subscribers')){
add_filter( 'bbp_forum_subscription_user_ids', 'rew_fltr_get_forum_subscribers', 10, 1 );
}
Thanks, Robin. I took a look at that plugin but didn’t see how that would impact emails. I saw “Forum Roles” and blocked users..but what do I check and where to make sure they don’t get notifications?
I’ll check out the code as well, but plug and play is preferred.
Thanks very much!
the plugin just does this automatically for blocked users, no settings involved
Argh, I just tested it with a blocked dummy account and the replies still come through, unfortunately. 🙁
So you’re saying the only thing I should have to do is change the Forum Role within WordPress>Users to “blocked” and this should work, correct?
yes – my plugin activated and user blocked – if that is not happening come back and I’ll take a further look.
can you also let me know if you are using bbp toolkit – not suggesting you do, I just need to know !
You’re very helpful, Robin.
Yes, plugin activated and user is blocked. I am NOT using bbp toolkit.
ok, I’ve released version 3.9.6 of style pack
can you update and test again for me please
Thanks Robin, looks like that did the trick!
great – glad you are fixed