5

The following error may occur if a previous registration remains pending with a conflicting 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.

The related username error looks like the following.

That username is currently reserved but may be available in a couple of days.

5 Answers 5

3
  1. Login as WordPress administrator
  2. Navigate to add a new user
  3. Check box to bypass email confirmation
  4. Add the user with a different email address
  5. Edit the user's email address to the desired result

For the similar username error, see How can I un-reserve a pending username registration?

The timeout period is 2 days following a conflict, and trac tickets to clarify this process currently exist here and here.

3

When I add a new user with a different email address, I get the error message: That username is currently reserved but may be available in a couple of days.

For me, I removed the row from the database in the table wp_signups where user_login equaled the username. Essentially:

delete from wp_signups where user_login = 'abc';

Then I was able to re-add the user.

Edit suggestion by @aubreypwd: Additionally, admins (network admins only in an MU or network install) have the option to add users without sending an email. If you check that option, it avoids this process.

1
  • I would also add details to make sure and next time you try and add the user, to click "bypass email confirmation" to complete this answer. This is a very good technical answer and the route I use.
    – aubreypwd
    Oct 25, 2019 at 21:21
1

To work around the "that email address has already been used" error, we can create a plugin that effectively bypasses the check. The plugin will work in three parts, utilizing three different hooks.

pre_user_login filters a username after it has been sanitized. We'll use this hook to grab the user, of particular interest is the email.

pre_user_email filters a user’s email before the user is created or updated. We'll use this hook to modify the email to some random characters.

user_register fires immediately after a new user is registered. We'll use this hook to manually update the user email after the user is registered.

add_filter( 'pre_user_email', [ new wpse_212671(), 'pre_user_login' ] );
class wpse_212671 {
  protected $user;
  public function pre_user_login( $user ) {
    $this->user = $user;
    if( isset( $user[ 'ID' ] ) || ! get_user_by( 'email', $user[ 'user_email' ] ) {
      return $user;
    }
    add_filter( 'pre_user_email', [ $this, 'pre_user_email' ] );
    add_action( 'user_register',  [ $this, 'user_register' ] );
  }
  public function pre_user_email( $email ) {
    return $this->generate_random_string();
  }
  public function user_register( $user_id ) {
    global $wpdb;
    $table = $wpdb->prefix . 'users';
    $wpdb->query( $wpdb->prepare(
      "UPDATE %s 
      SET user_email = %s
      WHERE user_login = %s", 
      $table,
      $this->user[ 'user_email' ], 
      $this->user[ 'user_login' ]
    ) );
  }
  //* Code slightly modified from http://stackoverflow.com/a/13212994/6077935
  protected function generate_random_string( $length = 40 ) {
    return substr( str_shuffle( str_repeat( 
      $x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
      ceil( $length / strlen( $x ) )
    ) ), 1, $length );
  }
}
1
  • So will this allow me to remove a user completely without having to go into the DB and manually remove the users from wp_signups?
    – Weird Mike
    Jun 4, 2017 at 20:46
0

There is a useful plugin called "User Activation Keys" which adds a menu item to the Network Users interface:

https://wordpress.org/plugins/user-activation-keys/

This allows for editing/deleting/approving user activation requests and subsequently reserved email addresses/usernames.

0

If you're comfortable working directly in MySQL and would rather not write code or install a plugin just for this task, you can fix this issue pretty simply.

Inside your site's MySQL database, there will be a table named { $wpdb->prefix }_signups, where $wpdb->prefix is whatever prefix you have configured WP to use for its database datables. (By default, that is wp_.)

Query that table by the email address that's locked up to find the signup record for it:

SELECT * FROM {$wpdb->prefix}_signups WHERE user_email = '{ email address }';

That should bring back the record of the signup attempt for that email address. Then just DELETE that record from the table, and you're done.

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.