• Resolved thomei

    (@thomei)


    We often see users register, but never confirming the e-mail address.

    In the “BP Registration Options” “member requests”-dialogue, I can’t see, if a new user has already confirmed it’s e-mail address in WP. Therefore I’ve two feature wishes:

    1) Add a column that shows the e-mail address approval status of a WP-user. “Approved” or “Pending.”

    2) Add an option to hide users generally in “member requests”-dialogue if they’re e-mail address is approved by WP.

    The fist one is really urgent to us. Would save us a lot of work.
    The second one is just for more consort.

    • This topic was modified 5 years, 5 months ago by thomei.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    Will consider both.

    In the meantime, this code snippet may help get you fairly far along for item one, since it’s your most urgent:

    function thomei_active_status( $user_id ) {
    	$user = get_user_by( 'id', $user_id );
    	global $wpdb;
    	$rs = $wpdb->get_results( $wpdb->prepare(
    		"SELECT active FROM {$wpdb->prefix}signups WHERE user_email = '%s'",
    		$user->user_email
    	) );
    
    	echo '1' === $rs[0]->active ? '<p><strong>active</strong></p>' : '<p><strong>inactive</strong></p>';
    }
    add_action( 'bpro_hook_member_item_additional_data', 'thomei_active_status' );
    

    We have an action hook inside the Additional Data column that can be used to add arbitrary information. So I tapped into that to get the user data and the active status from the signups table, and output “active” or “inactive” based on the result.

    Let me know if you have any questions with that part.

    Thread Starter thomei

    (@thomei)

    WOW!
    You are very quick with solutions!
    It works!
    Thank you very much!

    • This reply was modified 5 years, 5 months ago by thomei.
    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Welcome. I’m glad I had the hook available for this, to be honest ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘“Approved” or “Pending” users?’ is closed to new replies.