You should use the robots_txt
filter to exclude all of the URLs of posts written by specified author (untested):
add_filter( 'robots_txt', static function ( $output ) {
$query = new WP_Query( array(
'author' => 3,
'posts_per_page' => -1,
'no_found_rows' => true,
'fields' => 'ids',
) );
if ( ! $query->have_posts() ) {
return $output;
}
$siteurl = untrailingslashit( get_site_url() );
foreach ( $query->posts as $post ) {
$url = str_replace( $siteurl, '', get_permalink( $post ) );
$output .= sprintf( 'Disallow: %s\$%s', $url, PHP_EOL );
}
return $output;
} );