| 1 | Index: wp-includes/user.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/user.php (revision 17024) |
|---|
| 4 | +++ wp-includes/user.php (working copy) |
|---|
| 5 | @@ -534,8 +534,9 @@ |
|---|
| 6 | if ( !$this->results ) |
|---|
| 7 | return; |
|---|
| 8 | |
|---|
| 9 | - if ( $this->query_vars['count_total'] ) |
|---|
| 10 | - $this->total_users = $wpdb->get_var("SELECT COUNT($wpdb->users.ID) $this->query_from $this->query_where $this->query_orderby $this->query_limit"); |
|---|
| 11 | + if ( $this->query_vars['count_total'] ) { |
|---|
| 12 | + $this->total_users = $wpdb->get_var("SELECT COUNT(*) $this->query_from $this->query_where"); |
|---|
| 13 | + } |
|---|
| 14 | |
|---|
| 15 | if ( 'all_with_meta' == $this->query_vars['fields'] ) { |
|---|
| 16 | cache_users( $this->results ); |
|---|