BuddyDev

Search

[Resolved] Auto Activate Auto Login Support Custom Redirect

  • Keymaster
    (BuddyDev Team)
    Posts: 24093
    Brajesh Singh on #6091

    Hi Deco,

    Please use the following code and put it in your bp-custom.php

    
    
    function buddydev_custom_autologin_redirect( $redirect_url, $user_id) {
    
    	$redirect_url = site_url( '/welcome-page/' );//assuming that you want to redirect to welcome page
    
    	return $redirect_url;
    }
    add_filter( 'bpdev_autoactivate_redirect_url', 'buddydev_custom_autologin_redirect', 10, 2 );
    
    

    You can change the redirect url to anything you want.

    Hope that helps.

  • Participant
    Level: Initiated
    Posts: 10
    Deco Lipe on #6097

    Hello Breajesh,

    Thank you very much for the fast feedback.

    I’ve added the code in my bp-custom.php, but is not working yet.

    I want that the redirect goes to this page: http://cienciadafelicidade.net/pagamento/

    Look to code below:

    function buddydev_custom_autologin_redirect( $redirect_url, $user_id) {

    $redirect_url = site_url( ‘/pagamento/’ ); //assuming that you want to redirect to welcome page

    return $redirect_url;
    }
    add_filter( ‘bpdev_autoactivate_redirect_url’, ‘buddydev_custom_autologin_redirect’, 10, 2 );

    Maybe the server takes some time to update this configuration?

    The bp-custom.php file is on the /plugins root, maybe it’s wrong?

    Thank you

  • Keymaster
    (BuddyDev Team)
    Posts: 24093
    Brajesh Singh on #6098

    Hi Deco,
    Can you please your complete bp-cstom.php on pastebin? It does not seem to be loaded by buddypess on your site as the filter is not working. I tested by registering there.

  • Participant
    Level: Initiated
    Posts: 10
    Deco Lipe on #6101

    Hello Brajesh,

    Here it is: http://pastebin.com/8KM1SirV

    Thank you,

  • Participant
    Level: Initiated
    Posts: 10
    Deco Lipe on #6107

    Hello Brajesh,

    I need a solution for this question ASAP for my client, it’s very urgent.

    I’m waiting for your feedback.

    Thank you,

  • Keymaster
    (BuddyDev Team)
    Posts: 24093
    Brajesh Singh on #6108

    Hi Deco,
    I have looked at the bp-custom.php. It is perfect. If you have it in your wp-content/plugins/bp-custom.php then it should work.

    If it is not working , another plugin/code might be causing that. Please try by disabling suspect plugins.

    Do you have any plugin active for login redirect/activation redirect?

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 10
    Deco Lipe on #6112

    Helo Brajesh,

    Thank you very much for the quick response.

    I had some codes that were active, and I commented them out. I apologize for that. But unfortunately, the redirect still not working. I don’t know why.

    I have LearnPress installed, that is a LMS plugin. But I can’t deactivate because my site is a online course site. And after all, this plugin integrates with buddypress and uses it’s settings to user registration.I don’t think this plugin it’s causing conflict.

    I’ve inserted a list of all my active plugins below:

    AddToAny Share Buttons
    Admin Menu Editor
    Advanced Code Editor
    Advanced Custom Fields
    Akismet
    bbPress
    Bootstrap Shortcodes
    BuddyPress
    BuddyPress Auto Activate Autologin Redirect To Profile On Signup <- Your plugin!
    BuddyPress User Profile
    Custom Login URL
    Custom User Profile Photo
    Disqus Comment System
    Formulário de contato 7
    Google Analytics Dashboard para WP
    Importador do WordPress
    Insert PHP
    LearnPress
    LearnPress bbPress Course Forum
    LearnPress Export/Import Courses
    LearnPress Offline Payment
    LearnPress Prerequisite Courses
    LearnPress Question Fill In Blank
    Maintenance
    Show IDs
    Slate Admin Theme
    SMTP
    Theme Check
    vzaar official plugin
    WP Super Cache

    1) Maybe if we custom the code for your plugin “auto activation auto login” it would be easier?
    2) If we add this code on functions.php it would override other settings and work?

    Here is my webmaster login – could you give a look to see if you can help me?

    webmaster_ead
    *KQ$mYWJ4c2A!^U*zIRA(EkJ

    Best regards,

  • Keymaster
    (BuddyDev Team)
    Posts: 24093
    Brajesh Singh on #6113

    Hi deco,
    Let us try it other way.

    Please open plugin/bp-auto-activate-auto-login/bp-auto-activate-auto-login.php and go to line number 69.

    You will see a code like this

    
    
        bp_core_redirect( apply_filters( 'bpdev_autoactivate_redirect_url', bp_core_get_user_domain( $user->ID ), $user->ID ) );
    
    

    This is what is used to redirect in the auto activation plugin. Please comment it and then try to register and let me know what happens.

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 10
    Deco Lipe on #6150

    Hello Brajesh,

    With this line commented, we are being redirected to the a registerer success page, asking for the user to check the activation email. With the message “Your account is active!” And really it is active, indeed.

    I’ll try to change the redirect url in the plugin code and by adding the first snippet that you sent me in the functions.php, but I’m waiting for a solution. I can’t be so difficult to change the redirection URL. My entire site project is trapped by this little detail, and I’m running out of time.

    Please, the investment that I’ve made in this plugin will cost more than 100 BRL, and this is 1/5 of the amount i’m charging for this service. It’s so simple change – one page for another.

    I’m trying hard to solve this issue tonight. And I’m waiting for a solution from you.

    Thank you very much for helping me,

    Kindest regards

The topic ‘ [Resolved] Auto Activate Auto Login Support Custom Redirect’ is closed to new replies.

This topic is: resolved