Skip to:
Content
Pages
Categories
Search
Top
Bottom

Capability needed for subscription notification


  • roysmyth
    Participant

    @roysmyth

    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?

    I run a membership site. When membership expires, the user continues to be a member but with limited capabilities. I want the user to stop receiving subscription notifications.

Viewing 4 replies - 1 through 4 (of 4 total)

  • Robin W
    Moderator

    @robin-w

    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 🙁


    roysmyth
    Participant

    @roysmyth

    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.


    roysmyth
    Participant

    @roysmyth

    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

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar