feed Posts (RSS | eMail)
feed Comments (RSS | eMail)
Loading in process - please be patient.

Remember the Google Gmail Automatic BCC Option Petition!
[click to close]

BEFORE YOU READ ANY FURTHER – HERE IS A PLUGIN!

Download my (first!) plugin WP Protect Author Email
(tested with WP 2.6.2 up to 2.7.1).

It actually uses the “preprocess_comment” filter of WordPress to check the commenters eMail – thus making it unnecessary to change any core files (like explained below)!

All you have to do is unzip the file, open it with a text editor, look for “$wp_pae_email” and put in the address that should be protected. Then save and upload this file to your wp-content/plugins/ directory, activate it via the admin panel – and see if it is working. Any feedback is welcome!

WordPress does not provide any function that would check the commenter’s eMail against e.g. the blog owner’s eMail. That way, anybody could use the admin’s name and eMail to leave a comment in the name of the blog owner. Since these blog owner’s comments are often highlighted, this impersonation is quite crucial.

Here is a way to disallow using a distinct eMail without being logged in:

  1. Open wp-comments-post.php from the WP root directory.
  2. Search for the following code (line 53 in WP 2.6.2):
    if ( get_option('comment_registration') )
    wp_die( __('Sorry, you must be logged in to post a comment.') );
  3. After those lines, insert this and put in the eMail that should be checked (repeat these lines if you want several eMails to be checked):
    if ( strtolower($comment_author_email) == strtolower('email@to-be-check.ed') )
    wp_die( __('Sorry, but you must be logged in to use that email. Nice try, though... :-) ') );

Note:
If you are using Filosofo Comments Preview, you have to open that plugin file and do the same changes. The same would be necessary for any plugin that bypasses wp-comments-post.php.

Another note:
I wonder if I could use the “preprocess_comment” filter to add this functionality, so that the core WordPress files do not have to be touched.

Happy note:
Eureka! Bingo! Works! My first plugin! :-)

Inspired by the article Prevent author impersonation in WordPress comments.

The post ends here. Wanna leave a response? Have Your Say!
You can also subscribe to comments without commenting.
BTW: This post has comments.

Next post: Firebug And The Mysterious “Components Is Not Defined”
Previous post: Show Some Love To Your Readers With CommentLUV

Did you like this post? NoYes
No votes yet, be the first!
Loading ... Loading ...
Share this post with your friends:

Trackback URI | Comments RSS | Permalink

Comments

  1. This is
     Comment 
    #1
     Clare
    2008-11-11 @ 16:21:12 +0100 (CET) | Quote | Permalink 

    I’d never considered this before. Thanks for the tip – and the plugin.

    Clare recently posted: 3 perfect Christmas gift ideas for your wife

    ReplyReply
  2. This is
     Comment 
    #2
     witchypoo
    2008-11-12 @ 21:48:01 +0100 (CET) | Quote | Permalink 

    Wouldn’t this presuppose that you are using the Highlight Author Comment plugin?
    I love seeing geeks in action. Ask Andy.

    witchypoo recently posted: Mining the Search Strings

    ReplyReply
  3. This is
     Comment 
    #3
     Marco @saphod
    2008-11-15 @ 19:40:22 +0100 (CET) | Quote | Permalink 

    @witchypoo:
    Actually, you don’t have to use the “Highlight Author Comment” plugin, it is easy to implement this feature into your comment template, see this post. And even if the comment is not highlighted, it is still annoying if someone uses your name, isn’t it?

    ReplyReply

You can subscribe to comments without commenting

Have Your Say!

back to top