A companion addon to the popular Cookies for Comments plugin by Donncha O Caoimh for the WordPress CMS.
This plugin sets a cookie that must exist in order to login or to register in BuddyPress. If the cookie does not exist, the login or registration will not be allowed.
- Make sure the Cookies for Comments plugin is already activated and installed on your WordPress site.
- Download, install and activate this plugin.
- That's it!
Block attempts via .htacess with these rules:
*Change XXXXX to the cookie string as listed on the Cookies for Comments admin page.
# Login page
# Blocking only occurs during POST submission and if our cookie does not exist
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
RewriteRule ^wp\-login\.php - [F,L]
# BuddyPress registration page
# Comment out the POST line if you want to block direct access to the registration page
# Also if your registration slug is different than the default "register", change it!
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{HTTP_COOKIE} !^.*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.*$
RewriteRule ^register - [F,L]
- Requires cookies to be enabled by the users on your site.
0.1 - Pre-release
GPLv2 or later.