Ticket #29785: user_count.2.patch
File user_count.2.patch, 741 bytes (added by , 7 years ago) |
---|
-
user.php
854 854 $select_count = implode(', ', $select_count); 855 855 856 856 // Add the meta_value index to the selection list, then run the query. 857 $row = $wpdb->get_row( "SELECT $select_count, COUNT(*) FROM $wpdb->usermeta WHERE meta_key = '{$blog_prefix}capabilities'", ARRAY_N ); 858 857 $row = $wpdb->get_row( "SELECT $select_count, COUNT(*) FROM {$blog_prefix}usermeta JOIN {$blog_prefix}users ON user_id = ID WHERE meta_key = '{$blog_prefix}capabilities'", ARRAY_N ); 858 859 859 860 // Run the previous loop again to associate results with role names. 860 861 $col = 0; 861 862 $role_counts = array();