Cookies for Logins and BuddyPress
Sets a cookie that must exist in order to login to WordPress or to register in BuddyPress. Requires the Cookies for Comments plugin.
★ 1stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/r-a-y/cookies-for-logins/archive/refs/heads/master.zipA 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.
How to use?
- 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!
Advanced usage
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]
Caveats
- Requires cookies to be enabled by the users on your site.
Version
0.1 - Pre-release
License
GPLv2 or later.