[buddypress-trac] [BuddyPress Trac] #6601: BP calls update_meta_cache() 5997 times per page load

buddypress-trac noreply at wordpress.org
Thu Aug 27 03:09:04 UTC 2015

#6601: BP calls update_meta_cache() 5997 times per page load
 Reporter:  wcvendors              |       Owner:  r-a-y
     Type:  defect (bug)           |      Status:  closed
 Priority:  high                   |   Milestone:
Component:  Component - Messaging  |     Version:  2.3.2
 Severity:  major                  |  Resolution:  invalid
 Keywords:                         |

Comment (by wcvendors):

 Thank you @boonebgorges

 /* BuddyPress change members directory to only show vendors */
 function bpdev_exclude_users($qs=false,$object=false){
     //list of users to exclude

 separated ids of users whom you want to exclude

     if($object!='members')//hide for members only
         return $qs;


     //check if we are searching for friends list etc?, do not exclude in
 this case
         return $qs;



    return $qs;


 function bpdev_get_subscriber_user_ids(){
     $subscribers= get_users( array( 'role' => 'customer' ) );
        foreach((array)$subscribers as $subscriber)
    return $users;


 It appears this old legacy code was the issue in themes functions.php
 file.  I've removed it and simply modified the template for the /members/
 directory instead to show nothing instead, which is the true intent.

 Appreciate your fast support, and apologies for thinking this was a
 general BuddyPress bug.


Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6601#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list