diff --git src/wp-includes/comment-functions.php src/wp-includes/comment-functions.php
index 6b055d1..ab51eb3 100644
--- src/wp-includes/comment-functions.php
+++ src/wp-includes/comment-functions.php
@@ -2742,6 +2742,7 @@ function wp_handle_comment_submission( $comment_data ) {
 		$comment_author       = $user->display_name;
 		$comment_author_email = $user->user_email;
 		$comment_author_url   = $user->user_url;
+		$user_ID              = $user->ID;
 		if ( current_user_can( 'unfiltered_html' ) ) {
 			if ( ! isset( $comment_data['_wp_unfiltered_html_comment'] )
 				|| ! wp_verify_nonce( $comment_data['_wp_unfiltered_html_comment'], 'unfiltered-html-comment_' . $comment_post_ID )
