• Resolved eberswine

    (@eberswine)


    Hey, great plugin. A really nice addition to this enironment.

    I wonder if you have any shortcodes we could use to show a message on some other pages that do not show the :

    “notice – Your membership account is awaiting approval by the site administrator. You will not be able to fully interact with the social aspects of this website until your account is approved. Once approved or denied you will receive an email notice.”

    Basically:

    if ( $user != “approved” ) {

    echo “Our admin must approve before you post any content.. blah, blah”;

    }

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

    (@tw2113)

    The BenchPresser

    We haven’t created any shortcodes for the plugin. I know we have some small message placeholders that we switch out for each user message for the messaging.

    That said, you can wire up some things hopefully pretty easily using this function that we make use of:

    /**
     * Check our moderation status and return boolean values based on that.
     *
     * @since 4.2.0
     *
     * @param int $user_id User ID to check.
     * @return boolean Whether or not they're in moderation status.
     */
    function bp_registration_get_moderation_status( $user_id ) {
    	$moderated = get_user_meta( $user_id, '_bprwg_is_moderated', true );
    
    	if ( 'true' == $moderated ) {
    		return true;
    	}
    	return false;
    }
    

    Just provide the User ID to check on, and act based on that. Example:

    if ( true === bp_registration_get_moderation_status( get_current_user_id() ) ) {
    	// Do something for moderated users.
    }
    
    if ( false === bp_registration_get_moderation_status( get_current_user_id() ) ) {
    	// Do something for approved users, or perhaps return early and do something for a moderated user afterwards.
    }
    

    It’ll return true or false depending on status.

    Thread Starter eberswine

    (@eberswine)

    That is all I need. Thank you!

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Welcome

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Condition for Not approved ?’ is closed to new replies.