BuddyDev

Search

[Resolved] Redirect after activation in the email

  • Participant
    Level: Enlightened
    Posts: 130
    giuseppe on #44170

    Hello,

    I have tried the auto-activation login but it seems no way (I have tried all settings) to have a redirect after activation via email.

    I have read this article about it

    https://buddydev.com/redirect-users-to-welcome-page-after-successful-registration-on-your-buddypress-based-social-network/

    and I have 2 questions:

    1. Is it addable as snippet with snippet plugin or do I have to add in the .php file?

    2. What is the code to send the User to the home page?

    Many thanks,

    Giuseppe

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #44173

    Hi Giuseppe,
    Thank you for the question.

    You can use auto login on activation plugin(free) and it will help you achieve the same result.

    https://buddydev.com/plugins/bp-autologin-on-activation/

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 130
    giuseppe on #44179

    Hello,

    thanks for your answer.

    With the email you suggested I’m not able to send logged member to the home page, as it opens by default the member page.

    How could I send the member to the home page?

    Many thanks,

    Giuseppe

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #44185

    Hi Giuseppe,
    You can dd the following code to redirect to site home.

    
    // redirect to site home when auto logging after activation.
    add_filter( 'bpdev_autoactivate_redirect_url', function ( $url ) {
    	return home_url();
    } );
    

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 130
    giuseppe on #44198

    Perfect. Thank you very much.

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #44210

    You are welcome.

The topic ‘ [Resolved] Redirect after activation in the email’ is closed to new replies.

This topic is: resolved