In our site we need to batch-import lists of users in which all have unique usernames, but some share an email address. (In this context, it is because some individuals own different businesses identified by an Owner ID, but all are connected to the one user's email. But the site function requires a different login for each business.) We tried a patch to user.module, per
https://www.drupal.org/node/103706
but that does not appear to resolve the problem when creating users via User Import. Is there a way around this?

Comments

gisle’s picture

Version: 7.x-2.2 » 7.x-3.2
Status: Active » Fixed

The Drupal core gets really upset if you put exact duplicate email-addresses into the database, so allowing duplicate email addresses in User Import isn't really going to fly.

However, there is a workaround: User Import lets you import email addresses containing a plus sign. This is called "plus adressing" and gives you an unlimited number of aliases for a given email-address.

So if you need two email-adresses for joe@example.com, use joe+1@example.com and joe+2@example.com. Both are equivalent to joe@example.com, so password reset mail, etc. will arrive as you would expect.

I am setting this to fixed. You have two weeks to change status if you disagree.

gisle’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.