Comments: Do not flag a comment as a duplicate if the comment_author_email is provided but not a match.

This reduces the strictness of the duplicate check a little, but does prevent false duplicates for emoji or +1 comments by authors with matching names. The current logic was introduced all the way back in [2894].

Fixes #37093.

git-svn-id: https://develop.svn.wordpress.org/trunk@37713 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Rachel Baker
2016-06-15 14:50:38 +00:00
parent ade41fc2cf
commit 1d115078eb
2 changed files with 72 additions and 1 deletions
+1 -1
View File
@@ -600,7 +600,7 @@ function wp_allow_comment( $commentdata ) {
);
if ( $commentdata['comment_author_email'] ) {
$dupe .= $wpdb->prepare(
"OR comment_author_email = %s ",
"AND comment_author_email = %s ",
wp_unslash( $commentdata['comment_author_email'] )
);
}