WordPress.org

Make WordPress Core

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

File wp-comments-post.php.diff, 713 bytes (added by scribu, 4 years ago)
  • wp-comments-post.php

     
    7373if ( '' == $comment_content ) 
    7474        wp_die( __('Error: please type a comment.') ); 
    7575 
     76if ( $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->users WHERE user_email = '$comment_author_email'") ) 
     77        wp_die( __('Error: please login before posting a comment.') ); 
     78 
    7679$comment_parent = isset($_POST['comment_parent']) ? absint($_POST['comment_parent']) : 0; 
    7780 
    7881$commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID');