get_user_count() – Returns the number of active users in your installation.
You appear to be a bot. Output may be restricted
Description
Returns the number of active users in your installation.
Note that on a large site the count may be cached and only updated twice daily.
Usage
$int = get_user_count( $network_id );
Parameters
- $network_id
- ( int|null ) optional – ID of the network. Defaults to the current network.
Returns
int Number of active users on the network.
Source
File name: wordpress/wp-includes/user.php
Lines:
1 to 15 of 15
function get_user_count( $network_id = null ) { if ( ! is_multisite() && null !== $network_id ) { _doing_it_wrong( get_user_count, sprintf( /* translators: %s: $network_id */ __( 'Unable to pass %s if not using multisite.' ), '<code>$network_id</code>' ), '6.0.0' ); } return (int) get_network_option( $network_id, 'user_count', -1 ); }