get_user_count

The number of active users in your installation.

Description

(int) get_user_count(); 

The count is cached and updated twice daily. This is not a live count.

Returns (int)


Usage

  1. if ( !function_exists( 'get_user_count' ) ) { 
  2. require_once ABSPATH . WPINC . '/ms-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_user_count(); 
  7.  

Defined (1)

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

/wp-includes/ms-functions.php  
  1. function get_user_count() { 
  2. return get_site_option( 'user_count' );