If a user who has capability “participate” subscribes to a forum and then is demoted to capability “spectate”, will the user continue to receive notifications?
Yes, spectators can subscribe to forums, and this is against the user, not their access level.
It is certainly possible to code to prevent this, you be looking at filtering the functions
bbp_get_topic_subscribe_link
bbp_get_forum_subscribe_link
But whilst I’d love to, I have too much on at the moment to code it – sorry 🙁
Thanks for the quick response.
Since I need to prevent email going to some members who have already subscribed to forums and topics, looks like I need to hook into:
bbp_pre_notify_subscribers
bbp_pre_notify_forum_subscribers
or perhaps put my own versions of these functions in my child theme:
bbp_notify_forum_subscribers
bbp_notify_subscribers
Am I on the right track?
Thanks.
For future consideration.
Please add two hooks in bbpress/includes/common/functions.php after lines 1105 and 1245 to filter the array of user ids.
Something like
$user_ids = apply_filters( ‘bbp_forum_subscription_mail_ids’, $user_ids );
and
$user_ids = apply_filters( ‘bbp_topic_subscription_mail_ids’, $user_ids );
Can you create a ticket on Trac please and we can take a look.
https://bbpress.trac.wordpress.org