BuddyBoss Home – Web Support Forums Solutions Social Learner Login Redirect to BP My Course Page

Viewing 3 posts - 1 through 3 (of 3 total)
  • Question

    #60856
    @bennie07

    hello,

    @schwarzaufweiss
    povided the codes below in post earlier this month. it redirects users to their BP Profile page after login.

    Please can anyone help me modify it to redirect users to their BP Course page instead?

    
    add_filter( 'bp_login_redirect', 'bpdev_redirect_to_profile', 11, 3 );
     
    function bpdev_redirect_to_profile( $redirect_to_calculated, $redirect_url_specified, $user ){
    
    	if( empty( $redirect_to_calculated ) )
    		$redirect_to_calculated = admin_url();
     
    	//if the user is not site admin,redirect to his/her profile
    
    	if( isset( $user->ID) && ! is_super_admin( $user->ID ) )
    		return bp_core_get_user_domain( $user->ID );
    	else
    		return $redirect_to_calculated; /*if site admin or not logged in, do not do anything*/
     
    }

    Answers

    #60876
    @bennie07

    Can i get som help here please?

    #61219

    Anonymous
    @

    Hi @bennie07, Sorry for the delayed response…The plugin below can be used to do the same thing.
    https://wordpress.org/plugins/peters-login-redirect/

    Regards

Viewing 3 posts - 1 through 3 (of 3 total)
  • The question ‘Login Redirect to BP My Course Page’ is closed to new replies.