• Resolved amkh

    (@amkh)


    Is there a way to export pending approval members with their email addresses. If they can be exported / sync to Mailchimp then that will be great. If this is not possible then how to export the emails addresses comma separated or any other format such that we can just copy all and paste them in the To: of email to send

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

    (@tw2113)

    The BenchPresser

    I’m absolutely sure it’s possible as a whole, however it’s not functionality that we have set up and ready to use. It would take some custom code to achieve to do a WP_User_Query with part of that being a meta query for the key we use to denote them as pending or not.

    I can provide a bit more examples and help if you’re willing to try out code, but if that’s going to be an area that’s not your strong suit, then it will be more difficult overall.

    Thread Starter amkh

    (@amkh)

    Thank you for you response.
    A code based solution is fine with me. I can apply it in bp-funtions.php or through snippets plugin.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Probably not perfect for an import, and I can’t seem to log in to Mailchimp to confirm their formatting for mass import (Their admin is down for me at least), but this should help:

    I did it up as a shortcode for a quick-ish way to have a place to display the content. The output should be their username followed by a comma and their email address.

    Example row: “userone,[email protected]

    function bpro_shortcode_moderated_users(){
    	$args = array(
    		'meta_key'   => '_bprwg_is_moderated',
    		'meta_value' => 'true',
    		'fields' => array(
    			'user_login',
    			'user_email',
    		)
    	);
    	$moderated_object = new WP_User_Query( $args );
    
    	$moderated_users = $moderated_object->get_results();
    
    	ob_start();
    	foreach( $moderated_users as $user ) {
    		echo "<p>{$user->user_login},{$user->user_email}</p>";
    	}
    
    	return ob_get_clean();
    }
    add_shortcode( 'bpro_moderated_users', 'bpro_shortcode_moderated_users' );
    
    Thread Starter amkh

    (@amkh)

    Thank you very much. For my limited knowledge can you please elaborate more of Where will I see the output? will add this code to snippets plugin. But where will I see the list?

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Are you familiar at all with how shortcodes work?

    You could create a private page and simply drop in this:

    [bpro_moderated_users]
    

    and then visit the frontend and it should provide a list of what it can find. This, I assume is as long as this snippets plugin does what I’m asssuming.

    Thread Starter amkh

    (@amkh)

    Ok Got it Will try and get back to you

    Thread Starter amkh

    (@amkh)

    It works perfectly..It would be much better if you can enable to update mailchimp list. But the code is very useful to me now and I can manage with it. Thanks you very much.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Honestly, that would probably be something best left for a custom/3rd party plugin outside of our core one here. It’s not functionality we’ve ever had requests for before this thread here, so there’s not a lot of demand for it.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Exporting Emails of pending members’ is closed to new replies.