Posted by csilver on June 21, 2009 at 5:27am
| Project: | User Import |
| Version: | 6.x-2.3 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
| Issue tags: | duplicate email, sharedemail, user_import |
Issue Summary
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)
Comments
#1
I'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.
#2
No, not compatible, and the requirement to have a unique email address is hardcoded.
#3
I 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.
#4
If someone creates a suitable patch I'll be happy to review it.
#5
I 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.
#6
okletsgo, 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.
#7
Thank 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.
#8
I 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.
#9
This 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.
#10
Cross post - #887550: Ability to select primary key
#11
For proper support of this feature we need to implement #887550: Ability to select primary key, so I'm marking this as a duplicate.
#12
Here is one hackish solution
http://www.drupaldump.com/user-imports-and-duplicat-emails