bp_core_get_status_sql

Get SQL chunk for filtering spam users from member queries.

Description

(string) bp_core_get_status_sql( (bool) $prefix = false ); 

Returns (string)

SQL chunk.

Parameters (1)

0. $prefix — Optional. (bool) => false
Global table prefix.

Usage

  1. if ( !function_exists( 'bp_core_get_status_sql' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-wpabstraction.php'; 
  3.  
  4. // Global table prefix. 
  5. $prefix = false; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_core_get_status_sql($prefix); 
  9.  

Defined (1)

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

/bp-core/bp-core-wpabstraction.php  
  1. function bp_core_get_status_sql( $prefix = false ) { 
  2. if ( !is_multisite() ) 
  3. return "{$prefix}user_status = 0"; 
  4. else 
  5. return "{$prefix}spam = 0 AND {$prefix}deleted = 0 AND {$prefix}user_status = 0";