I need to convert a lot of data from an old site. I have about 10,000 users I need to migrate. There current info is in a MySQL database so moving the users names, passwords, and profile data isn't a problem except I can not locate any info on the Drupal users system.
Simple things like how roles are stored and the password encrypted.
Anyone know where I can find the docs for this information?

Comments

smallfluffykat’s picture

I've not used it personally as I'm not a coder but the first place I'd try if I was looking for that info is DrupalDocs. Hope this helps...

Dublin Drupaller’s picture

Hi lwatcdr...

It's a few months back, but, I migrated a membership club from an old (very old) system to Drupal and it was fairly straightforward.

Since doing that, a few new modules have popped up..in particular the IMPORT USERS module which is extremely handy.

like the other poster said..it's worth checking the drupal documentation...but as a tip..and from memory...I did the following:

a) created a dummy account with all the extra profile fields needed for the accounts.

b) exported out the USER, PROFILE_VALUES tables

c) worked out from there how to import in the users data

d) after importing, edit the SEQUENCES table and change the value for the last UID in the database. (the last user id)

Hope that helps. It's worth checking out the import user module though..as that covers all bases for you.

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

lwatcdr’s picture

I do know about drupal docs but I have no idea where the documentation on the user system may be hidden in it.
Lots of stuff on modules but very little on the internal guts of the system. I will take a look at the Import users module. The big problem I am going to have is a subscription system. I need some way to tie drupal to our customer database to set what roles they have.

Dublin Drupaller’s picture

If there is a corresponding flag on your old site for certain types of subscriptions, it's relatively simple to automatically assign a Drupal role by manipulating the USER ROLES table.

I.e. once you know the UID of your users in Drupal (Users table) you can, using something like excel, convert the flags used in the old dbase with the drupal one.

there is a field called DATA in the USER table which is tricky to manipulate (I'm not very familiar with excel which I was using to migrate the dbase) but I managed to switch "on" privatemessaging for all the users, for example.

I hope that makes sense....the user_import.module which is intended to automate a lot of this is at this link:
http://drupal.org/node/31940

It has a nice feature that automatically emails a welcome mail to everyone with their username & password.

Best of luck.

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

lwatcdr’s picture

I have a feeling that the data field is what I need to fiddle with. But where is it documented?

Dublin Drupaller’s picture

I'm not sure if it is lwatcdr....I notice that the user_import. module has been updated which may offer some assistance..I notice it has a new feature that maps columns to profile fields...

When i was doing the user migration, I couldn't find any docs on the USER->DATA table.. I just did it by trial and error.

Sorry I can't be of more help than that..but, seeing nobody else more experienced offered to chip in I thought I'd give my 2 cents.

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate