diff --git a/connectors/class-connector-comments.php b/connectors/class-connector-comments.php index fe7f16ba4..95ce1fa5e 100644 --- a/connectors/class-connector-comments.php +++ b/connectors/class-connector-comments.php @@ -194,8 +194,8 @@ public function get_comment_author( $comment, $field = 'id' ) { $user_name = isset( $user->display_name ) ? $user->display_name : $comment->comment_author; } - if ( $req_user_login ) { - $user = wp_get_current_user(); + if ( $req_user_login && isset( $comment->user_id ) ) { + $user = get_user_by( 'id', $comment->user_id ); $user_id = $user->ID; $user_name = $user->display_name; }