By maverickvarun on
Dear friends
We are maintaining a site for our alumni association. This site is based ASP - MS Access. We are planning to move it drupal but not sure of how we can import users. Right now we have 1400+ records
Any suggestions?
Varun
Comments
Examine user.module sources
User management in Drupal is done by user.module inside /modules directory. It stores users as a rows in database. To import users you must write a PHP script parsing MS Access user table export text and calling user module to add new users or inserting rows directly according to user module db schema.
Users import
Hi Varun.
My suggestions :
1. Make a simple export of your user table in cvs format.
2. Take a look at the table users in Drupal.
3. Modify the cvs file to create for each row a proper SQL
instruction to write this data in Drupal table
(A spreeadsheet tool could be particularly convenient :
each field in a column)
4. Launch the created script
If you need help in preparing the script, give me a sign.
Bye.
---
http://www.speedtech.it
Will not save passwords
They are md5 hashed.
MySQL MD5
Never tried, but MD5 function of MySQL can be used for populating password field ?
---
http://www.speedtech.it
Never tried
:)
thank you
Thank you
I am sorry but i am new to mysql too , so i am not sure if can play with the system .
There is a module called user import but i does not seem to be working
regards
Varun
You can use PHP+Drupal to import without SQL knowledge
Here is a signature of a function from user.module you will use to add users:
So your PHP importing script would be something like:
Assuming msaccess_csv_export.txt is a comma separated user parameters with a new line for every user. It can be exported by MS Access.
Script like this will import users and they will be automatically assigned new id's. So if you want to preserve content ownership you have to use this new ids or change them with UPDATE query.