bb_get_total_users

Get the total number of users.

Description

(int) bb_get_total_users(); 

Returns (int)


Usage

  1. if ( !function_exists( 'bb_get_total_users' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-statistics.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bb_get_total_users(); 
  7.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-statistics.php  
  1. function bb_get_total_users() 
  2. global $bbdb, $bb_total_users; 
  3. if ( isset( $bb_total_users ) ) { 
  4. return $bb_total_users; 
  5. if ( false === $bb_total_users = apply_filters( 'bb_get_total_users', false ) ) { 
  6. $bb_total_users = $bbdb->get_var( "SELECT COUNT(*) FROM $bbdb->users USE INDEX (PRIMARY);" ); 
  7. return $bb_total_users;