I'm using the shared email module with this one. When a second person is imported with the same email address, the first user is modified instead of the second user imported.
Say I import "Jane Doe" with email "jdoe@gmail.com". She comes in fine. Then a second import is done, specifying different roles. John Doe gets imported, also with "jdoe@gmail.com". jane is still in the system, but with John's other import data (roles, etc.).
Is this module supposed to be compatible with shared email?
(also posted to the shared email)
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | user.inc-altered-file.txt | 9.8 KB | arx-e |
| #6 | 497652.patch | 3.44 KB | aufumy |
Comments
Comment #1
jplarose commentedI'm in a similar situation. I developing a site for a local family oriented martial arts club. There are many instances where multiple people in the same family will sign up (IRL), and I'd like to create accounts for them. I cannot guarantee that each member has a unique email address, so I installed the sharedemail module. However, even with it installed, the user_import fails on duplicate email accounts.
Comment #2
robert castelo commentedNo, not compatible, and the requirement to have a unique email address is hardcoded.
Comment #3
jpcwebb commentedI know this is old and the module doesn't seem to be being actively developed, but I think this would be a very useful feature to have incorporated. I would have thought the email check would use a core function rather than within the module, and thus it could lever the shared email module just as easily.
Comment #4
robert castelo commentedIf someone creates a suitable patch I'll be happy to review it.
Comment #5
okletsgo commentedI am currently working on a system to where all the users are predefined and requires no email. I've found a module called optional_email to disable the use of the email field. It appears you have hardcoded the email requirement. Anyway this could tie into how the registration works? I've read around for the optional_email module and it seems this is a common request among the community.
Comment #6
aufumy commentedokletsgo, where is this optional_email module, I am curious, but can't find it.
anyway this is a patch that allows users to be added with duplicate emails.
Comment #7
ericc3 commentedThank you for working on this patch aufumy. However, after testing this patch I ran into a problem where the profile option "replace" under the fieldset 'update existing user' no longer works without getting "duplicated error"s. It seems that the patch broke the "replace" option functionality.
Comment #8
arx-e commentedI had the same problem and I managed to make this module import multiple users with the same e-mail address by manually altering the user.inc file at the function _user_import_validate_email (line 234).
Basically I commented out the third elseif. I know almost nothing of programing, php, etc. so I have no idea whether this would break something else (updating existing perhaps?).
The patch aufummy supplied didn' t work for me.
Comment #9
robert castelo commentedThis needs to be handled at a more conceptual level: implementing an option to use any field as a key.
I don't have time to write that myself at the moment, but would be useful if someone else could come up for a patch that does that.
Comment #10
mstrelan commentedCross post - #887550: Ability to select primary key
Comment #11
robert castelo commentedFor proper support of this feature we need to implement #887550: Ability to select primary key, so I'm marking this as a duplicate.
Comment #12
Marko B commentedHere is one hackish solution
http://www.drupaldump.com/user-imports-and-duplicat-emails