1

I tried the code listed in this answer, and this allowed me to create 2 users with the same email address, but not a third.

add_filter('wpmu_validate_user_signup', 'skip_email_exist');
function skip_email_exist($result){
    if(isset($result['errors']->errors['user_email']) && ($key = array_search(__('Sorry, that email address is already used!'), $result['errors']->errors['user_email'])) !== false) {
        unset($result['errors']->errors['user_email'][$key]);
        if (empty($result['errors']->errors['user_email'])) unset($result['errors']->errors['user_email']);
    }
    define( 'WP_IMPORTING', 'SKIP_EMAIL_EXIST' );
    return $result;
}

When trying to create a third user, I receive the error message:

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.

even though I checked "Skip Confirmation Email".

I've also tried the plugin Allow Multiple Accounts but this fails when creating the 3rd user account with the same email address too.

How can I allow more than 2 users to be created with the same email address in Wordpress >4.7?

2

Depending on which email provider you use, the easiest way is probably to use the user+tag@example.com format. Many common email systems will deliver mail as though it were addressed to user@example.com. The +tag portion of the email address can then be used both for filing mail and for screening it. WordPress, however, will see it as a different email address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.