Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress Users


  • EvilBen
    Participant

    @evilben

    Hey Guys.

    I need your help as soon as you can. Actually i think it’s not that difficult, but I couldn’t find a solution to solve my problem.

    I’ve got an old Buddypress Database, and Set Up the Backup of my old Buddypress files, because of a plugin that caused an error.

    Now, its not possible to get my old BuddyPress users right in the Database. I’ve got a .csv File with my old BP Users, but I don’t know where to put the data in, that the users are marked as “active”. Buddypress just told me after the Import, that there is just 1 User (me), but there have to be, about 150 active Users.

    What do I have to do, that the Database “think” that all Buddypress Users have already logged in, or are activated? What do I have to do?

    Hope you can help me…

    ah before I forget: I am using the newest BP and WP Version

    Thx

Viewing 11 replies - 1 through 11 (of 11 total)

  • shanebp
    Moderator

    @shanebp

    /*
     * Paste in your theme functions.php or in bp-custom.php.
     * Load the site in a browser
     * Then REMOVE this function 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' );

    EvilBen
    Participant

    @evilben

    Hey thanks for replying so quick.

    I do not find this file or function. I don’t have a bp-custom.php and in the functions.php, there is no function like the one above.


    shanebp
    Moderator

    @shanebp

    Did you try following the instructions?

    1. Paste in your theme functions.php
    2. Load the site in a browser
    3. Then REMOVE this function from your theme functions.php

    EvilBen
    Participant

    @evilben

    Hi shanebp,

    i guess i do not really understand what you want me to do? Where do I have to paste in functions.php?


    EvilBen
    Participant

    @evilben

    Ah i did understand now, what you meant. I pasted in your code, reload the site, and delete the code. But it changed nothing …

    Maybe i put the users in a wrong table? I added them in the wp_users table?


    shanebp
    Moderator

    @shanebp

    If you go to the all members page on the front end of your site, how many members are listed?


    EvilBen
    Participant

    @evilben

    everyone i imported is listed


    shanebp
    Moderator

    @shanebp

    Great, you’re all set.


    EvilBen
    Participant

    @evilben

    Yes that is right, but in the statistic on my site they aren’t listet. So there isn’t written: total users: xyzzy


    snorklebum
    Participant

    @snorklebum

    Have you tried Dashboard -> Tools -> BuddyPress then run the Repair total members count?


    EvilBen
    Participant

    @evilben

    Wow!!! Yes Sir, that worked – thank you very much 😉

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Skip to toolbar