Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Jay Kanakiya

    (@kanakiyajay)

    I slightly hacked the code.The error is not shown now

    function buddypress_login_redirection($redirect_url,$request_url,$user)
    {
    	global $bp;
    	if( $user && is_object( $user ) && is_a( $user, 'WP_User' ) ) {
    
    		$selected_option = get_option('blr_select_redirection');
    		if($selected_option == 'one')
    		{
    			return bp_core_get_user_domain($user->ID).'profile/';
    		}
    		elseif($selected_option=='two')
    		{
    			$activity_slug = bp_get_activity_root_slug();
    			$redirect_url = $bp->root_domain."/".$activity_slug;
    			return $redirect_url;
    		}
    		else
    		{
    			$activity_slug = bp_get_activity_root_slug();
    			$friends_activity = bp_core_get_user_domain($user->ID).$activity_slug."/friends/";
    			return $friends_activity;
    		}
        	}
        return $redirect_url;
    }

    Good Work…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Undefined WP_Error::$ID on line 16’ is closed to new replies.