You're using an outdated method of getting the current user role. get_currentuserinfo()
was deprecated in WordPress 4.5.
https://codex.wordpress.org/Function_Reference/get_currentuserinfo
Also, you shouldn't be loading CSS directly from your header.php file, you need to enqueue it instead.
Add the following code to your functions.php file.
function wpse_load_subscriber_stylesheet() {
if ( current_user_can( 'subscriber' ) ) {
wp_enqueue_style( 'login-subscriber-style', home_url( '/login/subscriber-style.css' ) );
}
}
add_action( 'wp_enqueue_scripts', 'wpse_load_subscriber_stylesheet' );
This assumes that your CSS is placed in your web root (https://example.com/login/subscriber-style.css). If it's in your theme folder instead then you need get_template_directory_uri() . '/login/subscriber-style.css'
.
https://developer.wordpress.org/reference/functions/wp_enqueue_style/