Change comment author

comment_author

When you don’t want to show the comment author’s email, you would want to replace it with something else.

add_filter( 'comment_author', 'wpa_custom_comment_author', 10, 2 );
function wpa_custom_comment_author( $author, $commentID ) {
    $comment = get_comment( $commentID );
    $user = get_user_by( 'email', $comment->comment_author_email );
    if( !$user ):
        return $author;
    else:
        return substr( $comment->comment_author_email, 0,2 ) . '****';
    endif;
}