Email Notifications being sent to Pending Members


Home Forums Front End PM PRO Email Notifications being sent to Pending Members

This topic is: Resolved
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12654
    STEVE
    Participant

    So I’m in the testing phase before I launch my site. I have “Ultimate Members”, “Front End PM PRO”, and the
    “Front End PM – Ultimate Member Integration” Plugins all installed. I have UM configured to not allow new member registrations to be automatically approved and instead require an Admin to approve or deny the membership. I noticed that new users pending review, even though they cannot log into the site, are able to receive email notifications from Front End PM PRO regarding both Announcements and Messages.

    I like this for Messages. It gives me an opportunity to look over a pending member’s profile and quickly send them an email via Front End PM PRO if I need to talk to them about their registration prior to approval.

    However, I don’t like that pending members are able to receive email notifications about Announcements that are meant for actual members.

    Is there a way we can prevent “Pending” members from receiving email notifications for Announcements, while still allowing them to receive Message notifications?

    Thanks

    #12660
    Shamim Hasan
    Keymaster

    add following code in your theme’s ( child theme’s if any) functions.php

    add_filter('fep_get_user_option', function( $value, $option, $default, $userid ){
        global $ultimatemember;
        if( ! $userid )
        $userid  = get_current_user_id();
    
        if( 'allow_ann' == $option && ! $ultimatemember->user->is_approved( $userid ) ){
            $value = 0;
        }
        return $value;
    }, 10, 4);
    
    #12692
    STEVE
    Participant

    @shamim

    Works like a charm! Thanks buddy!

    STEVE

    #13281
    STEVE
    Participant

    Hi @shamim,

    Bad news, the code above is no longer working after Ultimate Member upgraded to version 2.0.4.

    Any fix for this?

    Thanks

    #13316
    Shamim Hasan
    Keymaster

    Try following code

    add_filter('fep_get_user_option', function( $value, $option, $default, $userid ){
        global $ultimatemember;
        if( ! $userid )
        $userid  = get_current_user_id();
    
        if( 'allow_ann' == $option && ! $ultimatemember->user()->is_approved( $userid ) ){
            $value = 0;
        }
        return $value;
    }, 10, 4);
    
    #13327
    STEVE
    Participant

    That worked. Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.