• Resolved Jon Humphrey

    (@jonrandahl)


    I’d like to know if there’s a way to approve users, via BP registrations, without sending the approval email notification to those users?

    This issue is that there has been a switch of who’s been managing the user signup process and the previous person was using the standard membership approval process in BuddyPress to approve the requested user accounts.

    Now, with the new person in charge I’ve explained the process should be handled via BP Registration instead, which they’re happy with, but there are users still showing as pending approval in the BP Registrations listing even though their BuddyPress user accounts are “approved” and we can’t work out how best to remove them from the BP Registrations listing?

    Hence the query to not send approval emails to the accounts when approved via BP Registrations, unless there’s a better way to handle this!

    Thank you so much!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hmm.

    Best I can think of would be just “hotwiring” and overriding the email notification method, however this code I have below will do it for ALL of them, approved or denied.

    Basically we make use of a WordPress filter I put in a ways back that allows intercepting of the arguments passed to wp_mail() and with this, we just empty out the email address that the email would be sent to. This should cause an error in the mailing, and prevent the user from being notified in any way. It should also still mark them as approved/denied, etc so that they’re removed from the moderation list.

    Give it a try with some test users and see if it works out for you.

    function jonrandahl_bpro_email_override( $mail_details, $user ) {
    	$mail_details['user_email'] = '';
    
    	return $mail_details;
    }
    add_filter( 'bpro_hook_before_email', 'jonrandahl_bpro_email_override', 10, 2 );
    
    Thread Starter Jon Humphrey

    (@jonrandahl)

    Michael,

    Thank you so much, I truly appreciate this!

    I’m just working on a local instance of the site to test with, I’ll update with my results.

    Kindly,
    Jon

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Welcome

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

The topic ‘Approval without Email?’ is closed to new replies.