mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 21:28:02 +01:00
Make sure email and name are not blank when checking comment author in whitelist.
git-svn-id: https://develop.svn.wordpress.org/trunk@1840 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a82fa76aee
commit
b9640d9ec1
@ -1647,11 +1647,14 @@ function check_comment($author, $email, $url, $comment, $user_ip) {
|
|||||||
|
|
||||||
// Comment whitelisting:
|
// Comment whitelisting:
|
||||||
if ( 1 == get_settings('comment_whitelist')) {
|
if ( 1 == get_settings('comment_whitelist')) {
|
||||||
|
if( $author != '' && $email != '' ) {
|
||||||
$ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author_email = '$email' and comment_approved = '1' ");
|
$ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author_email = '$email' and comment_approved = '1' ");
|
||||||
if ( 1 == $ok_to_comment && false === strpos( $email, get_settings('moderation_keys')) )
|
if ( 1 == $ok_to_comment && false === strpos( $email, get_settings('moderation_keys')) )
|
||||||
return true;
|
return true;
|
||||||
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$mod_keys = trim( get_settings('moderation_keys') );
|
$mod_keys = trim( get_settings('moderation_keys') );
|
||||||
if ('' == $mod_keys )
|
if ('' == $mod_keys )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user