Must filter functions receive all arguments passed to them?

Your function does not have to accept all arguments, you can not specify the number of accepted arguments and it will default to passing just the first.

You can also specify any number up to and including the total number of arguments. For example if you only need the first 2, this will also work:

function my_filter_func( $redirect_to, $requested_redirect_to ) {
    // My code.
}
add_filter( 'login_redirect', 'my_filter_func', 10, 2 );

What you can’t do is use more arguments than what you specify in your add_filter call. For example, this will generate a missing argument 2 warning:

function my_filter_func( $redirect_to, $requested_redirect_to ) {
    // My code.
}
add_filter( 'login_redirect', 'my_filter_func' );