Skip to:
Content
Pages
Categories
Search
Top
Bottom

New users not showing on member page until they sign in

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

  • shanebp
    Moderator

    @shanebp

    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.

    https://gist.github.com/shanebp/b73343e9c9a6509d2bbc47de80c881c1


    wads24
    Participant

    @wads24

    Thank you. It worked great


    wegosi
    Participant

    @wegosi

    Hello @shanebp
    Thank you.
    I registered new user by myself via admin panel.
    So, I need to leave this code, right?
    Or maybe you can suggest other code to add Actitity stamp only for new users? Thank you.


    shanebp
    Moderator

    @shanebp

    So, I need to leave this code, right?

    No, remove it as instructed.

    For each new signup that is not created via wp-admin, try this:

    function weg_after_bp_registration_add_activity( $user_id, $user_login, $user_password, $user_email, $usermeta ) {
         bp_update_user_last_activity( $user_id, bp_core_current_time() );
    }
    add_action( 'bp_core_signup_user', 'weg_after_bp_registration_add_activity', 1, 5 );

    shanebp
    Moderator

    @shanebp

    For new users created via wp-admin, try:

    add_action( 'user_register', 'weg_bp_registration_save', 10, 1 );
    function weg_bp_registration_save( $user_id ) {
    	bp_update_user_last_activity( $user_id, bp_core_current_time() );
    }

    wegosi
    Participant

    @wegosi

    Thank you very much! Great.

    These codes should be permanently in functions.php, right?


    shanebp
    Moderator

    @shanebp

    Yes. Or bp-custom.php


    caioscarvalho
    Participant

    @caioscarvalho

    Hi
    Is this method still valid?

    If yes, should I put the function in the theme’s function.php in boorpress or wordpress theme?
    Thanks


    shanebp
    Moderator

    @shanebp

    Put it in the functions file for whatever theme you are using.

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