Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25494
    Brajesh Singh on in reply to: Username is not showing in buddypress header. #28695

    Hi Aditya,
    Thank you for the question.

    Can you please provide more details about the theme/template pack you are using. This will mostly depend on them.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25494

    Thank you Rob.
    I am glad it worked.

    Looking forward to work with you soon again.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25494

    Hi Rob,
    Yes, it is doable.

    The problem is that if we do it in this plugin, It might be against the expectation of many site admins since the plugin has been available for so many years.

    Here is some code. Please put it in your bp-custom.php and see if it helps.

    
    
    add_action( 'bp_actions', function () {
    	if ( ! bp_is_current_component( 'activate' ) ) {
    		return;
    	}
    
    	$key = bp_get_current_activation_key();
    	if ( ! $key ) {
    		return;
    	}
    
    	$user = apply_filters( 'bp_core_activate_account', bp_core_activate_signup( $key ) );
    
    	// If there were errors, add a message and redirect.
    	if ( ! empty( $user->errors ) ) {
    		bp_core_add_message( $user->get_error_message(), 'error' );
    		bp_core_redirect( trailingslashit( bp_get_root_domain() . '/' . buddypress()->pages->activate->slug ) );
    	}
    
    	bp_core_add_message( __( 'Your account is now active!', 'buddypress' ) );
    	bp_core_redirect( add_query_arg( 'activated', '1', bp_get_activation_page() ) );
    
    } );
    
    

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25494

    Hi Linda,
    The Community Builder theme is not compatible with Our Editable Activity and Rate limiters addon(for activity & messages).

    We are working on it and will be releasing the updates by coming Tuesday. Please disable the integration if you have one of them.

    Please let me know if that makes it work.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25494

    Hi Rob,
    No, this plugin does not bypass the second activation. All it does is logs in the user automatically. Otherwise, they need to login manually.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25494

    Hi Rob,
    WordPress does.

    It seems you are using the 3rd party integration which does not check it.

    You can verify it by visiting activity page from a user account and then marking the user as spammer and try posting with that account. Even though the form is there, you won’t be able to post.

    If you are using a plugin for the integration, Please do ask them how to resolve it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25494

    Hi Rob,
    I am sorry I missed to reply your email.

    The plugin “BuddyPress Autologin on Activation” logs in a user when they activate their account.
    So, It seems it is working as expected.

    If you want your users to be automatically activated and logged in on registration, You can use our “BuddyPress Auto Activate Auto Login” plugin.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25494

    Hi,
    Thank you for the patience.

    I do not think It can be caused by my code as I have only added 1 action on ‘bp_template_redirect’ to redirect.

    Please feel free to restore and check. Please let me know once you have restored it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25494

    Hi,
    Thank you.

    Please allow me to rephrase the question:-

    1. If a visitor comes to the sub site, should they be restricted or not?(By visitor, I am referencing to anyone on the internet who is not in logged in state).

    PS:- Please do let me know what happened with the site?

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25494
    This reply has been marked as private.