This plugin allows administrators to enable or disable other user account's logins.
When a user is disabled:
- They can not login to the site
- They are immediately logged out of the site
- Any application passwords created with this user will no longer authenticate with the WP REST API
Users can be enabled or disabled in their user profile and within the admin user list page.
This plugin integrates with WP-CLI and provides the following two commands:
# Enables the target users
wp user enable <List of User IDs, Logins or Emails> [--all]
# Disables the target users
wp user disable <List of User IDs, Logins or Emails> [--all]This site uses DDEV for local development, see that project's instructions for installation and setup.
The actual plugin files that appear on the WP Plugin directory are located in web/wp-content/plugins/user-login-disable.
This site uses Playwright for its integration tests and PHPUnit for its unit tests.
To run the integration tests first ensure you've installed the required dependencies, since this project uses DDEV it is recommended to use a Docker container to install the dependencies:
# From repository root
docker run --rm -it \
-v $PWD:/usr/src/app -w /usr/src/app \
node:16 npm installTo run the actual integration tests:
npm test $DEV_SITE_URLTBD