Skip to:
Content
Pages
Categories
Search
Top
Bottom

Dashboard User count inconsistent with Buddypress


  • Rainbow
    Participant

    @adi-admin

    Hi Buddypress Community,

    I have the weirdest issue regarding users.

    My Admin dashboard shows ALL users (ALL 1,734 Participants 1,732 and Subscribers 1,732).

    All of them have been active on the site (I used some PHP code to make all members active to ensure everyone shows up).

    But when I go to all members in the buddypress activity wall on the front end of the site, i see MORE! It shows 1,786 Users…!

    – What is going on, and how to fix that so there’s no user discrepancy.

    Many thanks

    Adi

Viewing 1 replies (of 1 total)

  • Rainbow
    Participant

    @adi-admin

    PS: I used this code in conjunction with the buddypress tool (Repair total members count):

    /*
    * Paste in your theme functions.php or in bp-custom.php.
    * Load the site in a browser
    * Remove from your theme functions.php or bp-custom.php.
    */

    function buddypress_add_last_activity() {
    
      $members =  get_users( 'fields=ID' );
      // $members =  get_users( 'fields=ID&role=subscriber' );
      
      foreach ( $members as $user_id ) {
            bp_update_user_last_activity( $user_id, bp_core_current_time() );
      }
    
    }
    add_action('bp_init', 'buddypress_add_last_activity' );
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar