Ticket #10931: wp-comments-post.php.diff

File wp-comments-post.php.diff, 713 bytes (added by scribu, 4 years ago)
Line 
1Index: wp-comments-post.php
2===================================================================
3--- wp-comments-post.php        (revision 12184)
4+++ wp-comments-post.php        (working copy)
5@@ -73,6 +73,9 @@
6 if ( '' == $comment_content )
7        wp_die( __('Error: please type a comment.') );
8 
9+if ( $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->users WHERE user_email = '$comment_author_email'") )
10+       wp_die( __('Error: please login before posting a comment.') );
11+
12 $comment_parent = isset($_POST['comment_parent']) ? absint($_POST['comment_parent']) : 0;
13 
14 $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID');