Don't limit total_users. props scribu, fixes #15479.

git-svn-id: https://develop.svn.wordpress.org/trunk@17034 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-12-17 22:07:26 +00:00
parent 8ec123bd34
commit e3c2e17aee

View File

@ -534,7 +534,7 @@ class WP_User_Query {
return;
if ( $this->query_vars['count_total'] )
$this->total_users = $wpdb->get_var("SELECT COUNT($wpdb->users.ID) $this->query_from $this->query_where $this->query_orderby $this->query_limit");
$this->total_users = $wpdb->get_var("SELECT COUNT(*) $this->query_from $this->query_where");
if ( 'all_with_meta' == $this->query_vars['fields'] ) {
cache_users( $this->results );