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)

CommentFileSizeAuthor
#8 user.inc-altered-file.txt9.8 KBarx-e
#6 497652.patch3.44 KBaufumy

Comments

jplarose’s picture

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.

robert castelo’s picture

No, not compatible, and the requirement to have a unique email address is hardcoded.

jpcwebb’s picture

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.

robert castelo’s picture

If someone creates a suitable patch I'll be happy to review it.

okletsgo’s picture

Version: 6.x-1.2 » 6.x-2.3

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.

aufumy’s picture

Status: Active » Needs review
StatusFileSize
new3.44 KB

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.

ericc3’s picture

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.

arx-e’s picture

StatusFileSize
new9.8 KB

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.

robert castelo’s picture

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.

mstrelan’s picture

This needs to be handled at a more conceptual level: implementing an option to use any field as a key.

Cross post - #887550: Ability to select primary key

robert castelo’s picture

Status: Needs review » Closed (duplicate)

For proper support of this feature we need to implement #887550: Ability to select primary key, so I'm marking this as a duplicate.

Marko B’s picture