BuddyDev

Search

[Resolved] BuddyPress Autologin on Activation – direct log to Edit Profile after activation

  • Participant
    Level: Initiated
    Posts: 16
    carasse on #44656

    Hello

    I have installed the BuddyPress Autologin on Activation plugin ; it really improves the user experience 🙂 That’s really nice.

    When the user clicks on the activation link, he is directly logged in on the profile page. Is it possible to give me lines of code to allow the user to log in on the Edit profile tab instead of the “Display” Profile tab ?

    Thanks for help.

    Fabien

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2440
    Ravi on #44657

    Hello Fabien,

    Thank you for using the plugin. Please try the following code in your bp-custom.php file

    
    
    add_filter( 'bpdev_autoactivate_redirect_url', function ( $redirect_url, $user_id ) {
    
    	if ( bp_is_active( 'xprofile' ) ) {
    		$redirect_url = trailingslashit( bp_core_get_user_domain( $user_id ) . bp_get_profile_slug() . '/edit' );
    	}
    
    	return $redirect_url;
    }, 10, 2 );
    
    

    Please check and let me know if it helps or not.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 16
    carasse on #44683

    I have pasted your code in Snippet plugin.

    It works perfectly. You are awesome Ravi 🙂

    THANKS.

    Fabien

The topic ‘ [Resolved] BuddyPress Autologin on Activation – direct log to Edit Profile after activation’ is closed to new replies.

This topic is: resolved