BuddyDev

Search

Member types pro redirect not working

  • Participant
    Level: Guru
    Posts: 664
    Tosin on #37017

    Hello,

    Buddypress member typro pro login redirection is not working no redirects occur after login also could this conflict with this code below or profile completion plugin

     function buddydev_redirect_tot_activity_for_loggedin() {
    	if ( ! is_user_logged_in() ) {
    		return;
    	}
    	if ( is_front_page() ) {
    		bp_core_redirect( bp_get_activity_directory_permalink() );
    	}
    }
    add_action( 'bp_template_redirect', 'buddydev_redirect_tot_activity_for_loggedin' ); 
  • Participant
    Level: Guru
    Posts: 664
    Tosin on #37023

    I just found out the issue

    1. Only first login redirect feature does not work
    2. Buddypress profile completion plugin redirect takes priority over all login redirects while using plugin like
    1. https://wordpress.org/plugins/peters-login-redirect/
    2. https://wordpress.org/plugins/bp-redirect-to-profile/
    3. https://wbcomdesigns.com/downloads/buddypress-redirect/

  • Participant
    Level: Guru
    Posts: 664
    Tosin on #37024

    I just found out the issue

    1. Only first login redirect feature does not work
    2. Buddypress profile completion plugin redirect takes priority over all login redirects while using plugin like
    1. https://wordpress.org/plugins/peters-login-redirect/
    2. https://wordpress.org/plugins/bp-redirect-to-profile/
    3. https://wbcomdesigns.com/downloads/buddypress-redirect/

  • Participant
    Level: Guru
    Posts: 664
    Tosin on #37022

    I just found out the issue

    1. only first login redirect feature does not work
    2. Buddypress profile completion redirect takes priority over all login redirects. I have tested this with various plugins like
    a. https://wordpress.org/plugins/buddypress-profile-completion/
    b. https://wordpress.org/plugins/peters-login-redirect/
    c. https://wbcomdesigns.com/downloads/buddypress-redirect/

  • Keymaster
    (BuddyDev Team)
    Posts: 21520
    Brajesh Singh on #37185

    Hi Tosin,
    Thank you for reporting and investigating.

    Please tell me how do you want it to work when these are enabled together?

    Regards
    Brajesh

  • Participant
    Level: Guru
    Posts: 664
    Tosin on #37193

    First of all I have this code below

    
    
     // filter buddypress profile completion redirect url to a custom page.
    add_filter( 'buddypress_profile_completion_redirect', function ( $redirect_url ) {
    	return get_permalink( 34168 );
    } ); 
    
    

    34168 = complete-profile page

    
    
     function buddydev_skip_redirect_on_non_bp_pages( $skip ) {
        if ( ! is_buddypress() ) {
            $skip = true;
        }
        return $skip;
    }
    add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_skip_redirect_on_non_bp_pages' );  
    
    
    
    
     function buddydev_redirect_to_news_feed() {
    	
    	if ( is_user_logged_in() && is_front_page() ) {
    		bp_core_redirect( bp_get_activity_directory_permalink() );
    		exit( 0 );
    	}
    }
    add_action( 'template_redirect', 'buddydev_redirect_to_news_feed' ); 
    
    

    Now when a new user register

    1. All first login redirects should go to (welcome) page instead of (complete-profile) page. Currently, by default all first logins redirect to (complete-profile) page by BuddyPress Profile Completion plugin.

    2. I want member types pro first login redirect to take priority to (welcome) page over the BuddyPress Profile Completion plugin

    Honestly, I was thinking why you never created an all comprehensive buddypress redirection plugin. The plugin would handle the following settings

    1. First login redirect for new users
    2. Second login redirect for new users
    3. Normal login and logout redirect for all users
    4. Option to select redirect page for logged in users while trying to access the home page (see third code I sent)
    5. Login and Logout redirect options based on member types.
    6. Login and Logout redirect options based on roles.

    Now all your other plugin can work or integrate effectively with this redirect plugin.
    PLUGINS LIKE
    1. Branded login plugin
    2. Member types pro plugin
    3. Profile completion plugin

    What do you think?

  • Participant
    Level: Guru
    Posts: 664
    Tosin on #37264

    Any update sir

  • Keymaster
    (BuddyDev Team)
    Posts: 21520
    Brajesh Singh on #37270

    Hi Tosin,
    I am sorry, I haven’t been able to test the combination. Please allow me a day to share my findings and reply.

    Regards
    Brajesh

  • Participant
    Level: Guru
    Posts: 664
    Tosin on #37348

    Hi have you been able to test the combination, I also use the BuddyPress Auto Activate Autologin plugin and activation redirection is set to [site_url]/account-created/ while login redirection is disabled.

You must be logged in to reply to this topic.

This topic is: not resolved