thomaslhotta / wp-separate-user-base
Installs: 799
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 5
Type:wordpress-muplugin
Requires
- php: >=8.0
- composer/installers: 1.* || 2.*
Requires (Dev)
- phpunit/phpunit: 9.*
- symfony/css-selector: 6.*
- symfony/dom-crawler: *
- wordpress/wordpress: 6.*
- wp-cli/wp-cli: 2.*
- yoast/phpunit-polyfills: 2.*
- dev-master
- 1.1
- 1.0.2
- 1.0.1
- 1.0
- 0.8.1
- 0.8
- 0.7.1
- 0.7
- 0.6
- 0.5
- 0.4
- 0.3
- 0.2
- 0.1
- dev-dependabot/composer/develop/symfony/dom-crawler-6.4.7
- dev-dependabot/composer/develop/phpunit/phpunit-10.5.20
- dev-dependabot/composer/develop/wordpress/wordpress-6.5.2
- dev-dependabot/composer/develop/yoast/phpunit-polyfills-2.0.1
- dev-dependabot/composer/develop/phpunit/phpunit-10.5.16
- dev-develop
- dev-dependabot/composer/develop/wp-cli/wp-cli-2.10.0
This package is auto-updated.
Last update: 2024-05-02 01:02:33 UTC
README
Master Branch | Develop Branch | All Branches |
---|---|---|
The WP Separate User Base plugin enhances WordPress Multisite installations by enabling each site within the network to maintain its own distinct user base. This flexibility allows for the creation of multiple user accounts with the same email address, while ensuring that these accounts are restricted to specific sites or the entire network as defined by the admin. This plugin is a powerful tool for administrators looking to customize their user management on a more granular level.
Features
- Flexible User Bases: Users can be restricted to individual sites, the entire network, or a combination of both. Additional separation criteria can be implemented via filters.
- Allows users to sign up to multiple sites with the same email address: Allows the creation of multiple user i accounts using the same email address, while ensuring that within the defined separation criteria, email addresses appear unique to WordPress and most plugins.
How It Works
- The plugin removes the global enforcement of unique
user_email
fields across the entire WordPress installation. - Users are assigned meta user keys that specify the sites and networks they are associated with. This is used to inject
meta queries into all uses of
WP_User_Query
to filter user queries, ensuring users only appear where they are supposed to. - This plugin Overrides the
get_user_by
function to account for the assigned sites and networks, as it does not utilizeWP_User_Query
. - Users are automatically associated with the site or network where they are created, based on the
wp_sub_add_users_to_network
network option.
Intended Audience
This plugin is designed for advanced WordPress users and administrators familiar with WordPress Multisite environments and who require custom user management solutions.
Limitations
- No frontend interface is provided for users to sign up for multiple sites.
- Users can still be retrieved by ID or
user_login
through methods that do not utilizeWP_User_Query
orget_user_by
, potentially bypassing restrictions. - Usernames must remain unique across the network.
Installation
- Download the plugin from the GitHub repository.
- Upload the plugin files to your WordPress installation's
wp-content/plugins
orwp-content/mu-plugins
directory. - Activate the plugin through the 'Plugins' screen in WordPress.
Usage
This plugin offers extensions to the admin interface and WP-CLI commands for managing user availability across sites and networks. .
Contributing
Contributions to the WP Separate User Base plugin are welcome.
Support
For support, please open an issue on the GitHub repository. Please note that this plugin is provided "as is" without warranty of any kind, either expressed or implied.
License
The WP Separate User Base plugin is open-source software licensed under the MIT license.