WP Manifestindependent plugin directory
manifest / security / cookies-for-logins

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

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/r-a-y/cookies-for-logins/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

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.

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.