bp_registration_get_moderation_status

Check our moderation status and return boolean values based on that.

Description

(boolean) bp_registration_get_moderation_status( (int) $user_id ); 

Returns (boolean)

Whether or not they're in moderation status.

Parameters (1)

0. $user_id (int)
User ID to check.

Usage

  1. if ( !function_exists( 'bp_registration_get_moderation_status' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bp-registration-options/includes/core.php'; 
  3.  
  4. // User ID to check. 
  5. $user_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_registration_get_moderation_status($user_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/core.php  
  1. function bp_registration_get_moderation_status( $user_id ) { 
  2. $moderated = get_user_meta( $user_id, '_bprwg_is_moderated', true ); 
  3.  
  4. if ( 'true' == $moderated ) { 
  5. return true; 
  6. return false;