Allow import of user IDs

wonder95 - March 21, 2009 - 20:27
Project:User Import
Version:6.x-0.4
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

I have a use case for this module where I need to import users that already have a unique ID that could be used for the Drupal user ID. As I see it now, the module creates the Drupal user ID as it is imported, with no option to allow importing of one from the file. I would like to have the ability to choose between having one created and importing one as a field in the file.

I will write the patch if this is something that would be committed.

#1

Robert Castelo - March 22, 2009 - 12:38

A good solution would be to enable selection of which data to match from a list of fields that act as a unique key. For instance UID, username, or a particular profile field.

We should build this into the APIs so that each supported module can add candidate fields to the list.

For something like a profile field there should be a check to make sure field data is unique.

I estimate 2-3 days work to implement this properly.

There's also another issue considering this feature, so would be best to collaborate if anyone is going to work on it.

http://drupal.org/node/375544

#2

goatvirus - March 26, 2009 - 19:03

I too would be very interested in this, it is pretty much essential for my current project that we can set the Drupal UIDs to a field from the imported CSV file.

Any updates, Mr. Castelo?

cheers
Fish
http://goatvirus.com

#3

Robert Castelo - March 26, 2009 - 21:10

Well, if someone wants to sponsor me to work on this for 3 days I'll be happy to work on it immediately, otherwise it goes on my long term To Do list while I give my other modules some much needed TLC.

#4

goatvirus - April 2, 2009 - 04:43

wow, it's three days work, you think? ok, i guess putting in a quick fix myself wouldn't be as easy as i thought. darn.

i wish i had the cash to sponsor you to do this!

cheers
Fish

#5

tstermitz - April 20, 2009 - 15:01

I don't understand why username isn't part of the foundation of this module. Am I missing something? I didn't even see username as a field matching option on my upload. This is present in node import, which handles users as well as other nodes.

Is it because in Drupal the email is used as the primary user key? In the non-Drupal world, database designers use unique identifiers to link user tables, but 90% of the time this is not email. It would be account number, student number, SSN or even a custom concatenated key.

For example, I have a database of attendees to an event. Some are so old school that they don't even have an email. Secondly, I have couples who share an email. Obviously, I have to take registrations and deposit checks even if they don't have email.

Personally, I would rate this feature as critical, but I'll let the developers decide. Maybe in their case they don't see the importance of this.

 
 

Drupal is a registered trademark of Dries Buytaert.