• leesal

    (@leesal)


    I’m having a comment moderation problem- comments to my blog are going into the moderation queue depending on the Name someone uses to post a comment, and not based on the email address they provide.

    I was under the impression that a previously approved commenter would post immediately if they provided the same email address as the did on a previously approved comment. But their comment will only post immediately if they use the same name and email address.

    I tested it and I had to enter the *exact* name I entered on a previously approved comment to get it to post without moderation, even though I used the same email address.

    I’m wondering if this is something I have set improperly in the comments.php template.

    here’s my setup:

    Options/ Discussion
    Before a comment appears:

    OFF An administrator must always approve the comment
    ON Comment author must fill out name and e-mail
    ON Comment author must have a previously approved comment

    I’m using Akismet.

    I’ll post my comments.php template if anyone thinks this might be the issue.

    Any ideas? This is really bugging me.
    what I’d really love is to be able to approve comments by IP Address instead…

Viewing 7 replies - 1 through 7 (of 7 total)
  • travelvice

    (@travelvice)

    Looks like I’m having the same problem with the same setup. Resolution would be lovely.

    moshu

    (@moshu)

    What “resolution” do you want?

    If you really have “the same” problem (which is true only in 1% of the cases) then you have the same setting:

    ON Comment author must fill out name and e-mail
    ON Comment author must have a previously approved comment

    The comment author is identified by name AND email.
    So, requiring both to be the same to be recognized… is logical. Isn’t it for you?

    moshu

    (@moshu)

    ..and don’t double post!

    travelvice

    (@travelvice)

    Sorry, in my eyes that wasn’t a double post — leesal was seeking an IP address only verification, I was seeking a e-mail only verification.

    The problem still remains that people are having comments moderated when they’ve slightly altered their display name.

    I suppose I’m looking for the CORE file that does this query, so that I can keep it from comparing the submitted display name against the inventory of approved comments (checking only the e-mail address instead)… while still requiring the user to enter data into both fields upon submission.

    … I’m hunting for function “check_comment()”

    travelvice

    (@travelvice)

    OK — I’ve got it (for the e-mail bit)…

    file: /wp-includes/comment.php

    Line 49:

    ***OLD***
    $ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author = '$author' AND comment_author_email = '$email' and comment_approved = '1' LIMIT 1");

    ***NEW***

    $ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author_email = '$email' and comment_approved = '1' LIMIT 1");

    I have verified that the e-mail address verification is not case sensitive. User can now enter any name and still bypass moderation if their e-mail address was previously entered (and attached to an approved comment).

    travelvice

    (@travelvice)

    leesal:

    Although I have not verified this, I believe it will work for your problem:

    Same code location, but checks the commenter IP address for an approved comment to bypass moderation

    ***NEW***

    $ok_to_comment = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_author_IP = '$user_ip' and comment_approved = '1' LIMIT 1");

    I’ve also noted this information here:
    https://compendium.travelvice.com/wordpress-comment-moderation-by-e-mail-address-or-ip-address-only/

    Thread Starter leesal

    (@leesal)

    Moshu-
    Nope, it is not logical. My reason for thinking a previously approved comment is based on email alone is because of this, from the WordPress Docs:

    Comment author must have a previously approved comment
    When this box is checked, comments are only posted if the comment author’s email address matches the address of a previously approved comment, otherwise, the comment is held for moderation.

    A commenter being required to fill out a name and email is a separate option from a comment needing to be previously approved. Nowhere is it stated that the two are dependent on one another.

    If this is the case perhaps someone could clarify this is the Docs.

    travelvice
    thank you so much for trying to help. I will try this out tomorrow and I’ll let you know if it solves the problem for me after some testing.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Comments being moderated by NAME *and* email???’ is closed to new replies.