This plugin hasnt been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Allow Multiple Accounts

Description

Allow multiple user accounts to be created, registered, and updated having the same email address.

By default, WordPress only allows a specific email address to be used for a single user account. This plugin removes that restriction.

The plugin’s settings page (accessed via Users -> Multiple Accounts or via the Settings link next to the plugin on the Manage Plugins page) provides the ability to allow only certain email addresses the ability to have multiple accounts (such as if you only want admins to have that ability; by default all email addresses can be used more than once). You may also specify a limit to the number of accounts an email address can have (by default there is no limit).

Template Tags

The plugin provides three optional template tags for use in your theme templates.

Functions

<?php c2c_count_multiple_accounts( $email ); ?>

Returns a count of the number of users associated with the given email.

<?php c2c_get_users_by_email( $email ); ?>

Returns the users associated with the given email.

<?php c2c_has_multiple_accounts( $email ); ?>

Returns a boolean indicating if the given email is associated with more than one user account.

Arguments

$email (string)
An email address.

Filters

The plugin exposes three filters for hooking. Typically, customizations utilizing these hooks would be put into your active theme’s functions.php file, or used by another plugin.

c2c_count_multiple_accounts (filter)

The ‘c2c_count_multiple_accounts’ hook allows you to use an alternative approach to safely invoke c2c_count_multiple_accounts() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site.

Arguments:

same as for c2c_count_multiple_accounts()

Example:

Instead of:

<?php echo c2c_count_multiple_accounts( $email ); ?>

Do:

<?php echo apply_filters( 'c2c_count_multiple_accounts', $email ); ?>

c2c_get_users_by_email (filter)

The ‘c2c_get_users_by_email’ hook allows you to use an alternative approach to safely invoke c2c_get_users_by_email() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site.

Arguments:

same as for c2c_get_users_by_email()

Example:

Instead of:

<?php echo c2c_get_users_by_email( $email ); ?>

Do:

<?php echo apply_filters( 'c2c_get_users_by_email', $email ); ?>

c2c_has_multiple_accounts (filter)

The ‘c2c_has_multiple_accounts’ hook allows you to use an alternative approach to safely invoke c2c_has_multiple_accounts() in such a way that if the plugin were deactivated or deleted, then your calls to the function won’t cause errors in your site.

Arguments:

same as for c2c_has_multiple_accounts()

Example:

Instead of:

<?php echo c2c_has_multiple_accounts( $email ); ?>

Do:

<?php echo apply_filters( 'c2c_has_multiple_accounts', $email ); ?>

Screenshots

A screenshot of the plugin's admin settings page.

A screenshot of a registration attempt failing due to exceeding the limit on the number of allowed multiple accounts.

A screenshot of the error message shown on a user's profile whose email address change failed due to exceeding the limit on the number of allowed multiple accounts.

Installation

Whether installing or updating, whether this plugin or any other, it is always advisable to back-up your data before starting

Go to the Users -> Multiple Accounts admin settings page (which you can also get to via the Settings link next to the plugin on the Manage Plugins page) and configure settings. On a Multisite install, go to My Sites -> Network Admin -> Users -> Multiple Accounts.

FAQ

Installation Instructions

Whether installing or updating, whether this plugin or any other, it is always advisable to back-up your data before starting

Go to the Users -> Multiple Accounts admin settings page (which you can also get to via the Settings link next to the plugin on the Manage Plugins page) and configure settings. On a Multisite install, go to My Sites -> Network Admin -> Users -> Multiple Accounts.

Why would I want to allow multiple accounts to be associated with one email address?

Maybe your site is one that doesn’t mind if users can sign up for multiple accounts from the same email address, perhaps for different identities. More likely, you as an admin, plugin developer, and/or theme developer would like to be able to create multiple accounts on a site to test various permissions or you just want to test the blog having numerous users and don’t want to have to assign unique email addresses for each account.

Can I limit who can create multiple accounts for an email address?

Yes. You can specify a limit on how many accounts can be created per email address. You can also explicitly list the email addresses which are allowed to create multiple accounts (useful for just allowing admins to have multiple accounts).

How does the plugin affect the “Lost your password?” feature?

The clearest method for resetting a forgotten password is to supply the username on the “Lost your password” form when prompted.

If an email address is instead supplied on the form, WordPress will send an email to that address with reset information for the first account found associated with that address. If multiple accounts are associated with that email address, then the email will include a listing of all associated usernames. In order to reset the password for a specific account, go back to the forgotten password form and supply the desired username, or if the email that was sent happens to be for the account that needs the password reset, follow the instructions and link in the email. Bear in mind that the password reset email can be safely disregarded if it relates to an account that shouldn’t be reset.

Does this plugin allow existing user accounts to update to share an email address?

Yes. Account email address usage is handled for existing accounts as well when they attempt to change their email address. If a user account is updated to try to use an email address that has exceeded its allowable use limit, the change will simply be denied (with an error message; see screenshot 3) and their email address will remain unchanged.

What if I allowed email addresses to create up to 5 accounts and some people did so. Then I lowered the limit to 2. What happens now that some email accounts exceed the current limit?

Nothing happens. The plugin does not enforce anything with existing accounts. Those email addresses will not be able to create new accounts because they exceed the current limits. However, if one of those accounts changes their email address to something else and then tries to change back, then won’t be able to do so because the limit of 2 will prevent them from switching to that particular email address (since there would still be 4 other accounts using the email address in this hypothetical scenario).

Is this Multisite compatible?

Yes.

Is this BuddyPress compatible?

Yes.

In Multisite, why do I get this error message when trying to register for another account with an already used email address: “That email address has already been used. Please check your inbox for an activation email. It will become available in a couple of days if you do nothing.”

If you’re seeing that error then it means the email address used for the new registration matches one used by an account in the signups table. Basically, an account has been registered with that email address but has not been activated yet. Only one account can be in this registered-but-not-activated state per email address.

Before that email address can be used for another account, you have to activate that pending account, delete the pending account from the signups table, or wait a couple of days until the pending account expires.

Reviews

Thanks for sharing, works great with WordPress 3.9.1.
After deactivating normal user-management seems being unaffected, unless you try to change an existing “multiple-email-user” or ad a new user of this type.
(but after re-activating this tasks succeed too!)

I find it very useful for maintaning historic users, who won’t will have own editor-access at the instance but should remaining for historical intentions; giving them an unremindable password in combination with an admin-dummy-email (nobody@your-website.org) and then re-declaring them as only registered users will make these Userprofiles acceptable on a productive WordPress website, I think?!

Just went all over the web looking for simple function to allow this since our news portal has multiple “accounts” per agency, and one “author” per “account,” so each agency needs to be able to get alerts by email “per author” — so one person’s email might be associated with 5 clients.

2.5

Fix has_exceeded_limit() to account for the account_limit applying to certain emails and not everyone

Fix to properly register activation and uninstall hooks

Add filters ‘c2c_count_multiple_accounts’, ‘c2c_get_users_by_email’, and ‘c2c_has_multiple_accounts’ to respond to the function of the same name so that users can use the apply_filters() notation for invoking template tags