By DonTino on
To which tables of the DB do I have to add info when importing users from another script?
I found the 'users' table to add the users but is it the only table or are there any others I need to add the users, their ids etc... in order to make everything work properly?
Tino
Comments
There is also a
There is also a "users_roles" table, but you should only add entries there if you want to grant more permissions than the basic "Authenticated user" permission set. So only users table should be enough, I've tested it before.
SabbeRubbish
user_import
Hi Don,
It's well worth looking at the user import.module if you have the user data in a format like excel/access or other that you can export out into CSV. I've used it before and it does all the updating of the database for you and also offers an option of applying a specific role to the imported users, sending everyone a welcome/login email etc.
Phil.
Sequences Table
You also need to update the 'sequences' table. I'm going from memory now, but search of a field value "users_uid" and update the corresponding "value" value to the last id of the users table. When adding new users via Drupal, for some reason Drupal checks the auto-created user id of the 'users' table with that stored at the 'sequences' table. I've got no idea why that is necessary, it's just done that way.
___________________________
Steven Taylor
Melbourne, Australia.
http://superjacent.net/cms
Oh my god! You are a life
Oh my god! You are a life saver... sequences! It makes total sense!