Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to ensure old members don’t get notifications?


  • LNAngel
    Participant

    @lnangel

    This is complementary to this recent post: https://bbpress.org/forums/topic/remove-members-from-forum/

    I’m trying to figure out a solve for users that are no longer paying members who have left the membership and are still receiving email notifications for topics or forums they’ve subscribed to.

    I understand the way the membership software and bbPress could be improved, however, until that happens, I need a workaround even if it’s manual.

    I tried changing the status of a user, per Robin’s suggestion to “blocked”, however, they are still receiving notifications.

    Any other suggestions?

    The user cannot edit these themselves, since they’ve left the membership.

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

  • Robin W
    Moderator

    @robin-w

    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 );
    }

    LNAngel
    Participant

    @lnangel

    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!


    Robin W
    Moderator

    @robin-w

    the plugin just does this automatically for blocked users, no settings involved


    LNAngel
    Participant

    @lnangel

    Thanks, Robin!


    LNAngel
    Participant

    @lnangel

    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?


    Robin W
    Moderator

    @robin-w

    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 !


    LNAngel
    Participant

    @lnangel

    You’re very helpful, Robin.

    Yes, plugin activated and user is blocked. I am NOT using bbp toolkit.


    Robin W
    Moderator

    @robin-w

    ok, I’ve released version 3.9.6 of style pack

    can you update and test again for me please


    LNAngel
    Participant

    @lnangel

    Thanks Robin, looks like that did the trick!


    Robin W
    Moderator

    @robin-w

    great – glad you are fixed

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