Stopping Anonymous Posting
By default WordPress allows anyone to add comments to a message. This would be nice, except that the spammers abuse it and add spam to every single posting. This simple snippet of code added to the wp-comments-post.php file, after the check for require_name_email, will require posters to first be logged in.
# Require user to be registered and logged in before allowing posting
# 30 second hack by Brian C. Lane - www.libertynews.org
get_currentuserinfo();
if( empty($user_nickname) && empty($user_email) )
die( __('Error: You must be logged in before you can post') );
this posting has a couple of similar methods that block the comment posting form (but to block actual posting you need my hack).






Sphen's Blog - The Weblog of Stephen Naicken » Blog Spam wrote:
[...] mous commenting and I found it! Have a look at http://wordpress.org/support/10/7663 and http://www.libertynews.org/index.php?p=7. These hacks allow only registered users to post comments whic [...]
Posted on 22-Jan-05 at 9:23 pm | Permalink
Sphen's Blog - The Weblog of Stephen Naicken » Blog Spam wrote:
[...] mous commenting and I found it! Have a look at http://wordpress.org/support/10/7663 and http://www.libertynews.org/index.php?p=7. These hacks allow only registered users to post comments whic [...]
Posted on 22-Jan-05 at 9:23 pm | Permalink