get_user_count( int|null $network_id = null )

The number of active users in your installation.


Description

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


Parameters

$network_id

(int|null) (Optional) ID of the network. Default is the current network.

Default value: null


Return

(int) Number of active users on the network.


Source

File: wp-includes/ms-functions.php

function get_user_count( $network_id = null ) {
	return get_network_option( $network_id, 'user_count' );
}


Changelog

Changelog
Version Description
WP-4.8.0 The $network_id parameter has been added.
WP-MU Introduced. (3.0.0)