bb_get_bozos

The BuddyPress bb get bozos function.

Description

bb_get_bozos( (int) $page = 1 ); 

Parameters (1)

0. $page — Optional. (int) => 1
The page.

Usage

  1. if ( !function_exists( 'bb_get_bozos' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-plugins/bozo.php'; 
  3.  
  4. // The page. 
  5. $page = 1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bb_get_bozos($page); 
  9.  

Defined (1)

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

/bp-forums/bbpress/bb-plugins/bozo.php  
  1. function bb_get_bozos( $page = 1 ) { 
  2. global $bbdb, $bb_last_countable_query; 
  3. $page = (int) $page; 
  4. $limit = (int) bb_get_option('page_topics'); 
  5. if ( 1 < $page ) 
  6. $limit = ($limit * ($page - 1)) . ", $limit"; 
  7. $bb_last_countable_query = "SELECT user_id FROM $bbdb->usermeta WHERE meta_key='is_bozo' AND meta_value='1' ORDER BY umeta_id DESC LIMIT $limit"; 
  8. if ( $ids = (array) $bbdb->get_col( $bb_last_countable_query ) ) 
  9. bb_cache_users( $ids ); 
  10. return $ids;