Skip to:
Content

bbPress.org

Changeset 4254


Ignore:
Timestamp:
10/19/2012 12:18:52 AM (14 years ago)
Author:
johnjamesjacoby
Message:

bbp_get_total_users():

  • Use count_users() instead of get_users().
  • Fixes #1982, #1984.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bbp-includes/users/functions.php

    r4250 r4254  
    10251025 */
    10261026function bbp_get_total_users() {
    1027 
    1028         // Check the cache
    1029         $bbp_total_users = wp_cache_get( 'bbp_total_users', 'bbpress' );
    1030 
    1031         // No cached value exists, so get it and cache it
    1032         if ( empty( $bbp_total_users ) ) {             
    1033                 $bbp_total_users = count( get_users() );
    1034                 wp_cache_set( 'bbp_total_users', $bbp_total_users, 'bbpress' );
    1035         }
    1036 
    1037         // Always allow filtering of results
    1038         return apply_filters( 'bbp_get_total_users', (int) $bbp_total_users );
     1027        $user_count = count_users();
     1028        return apply_filters( 'bbp_get_total_users', (int) $user_count['total_users'] );
    10391029}
    10401030
Note: See TracChangeset for help on using the changeset viewer.