This is a 'How To' guide on importing users from an existing Invision Power Board database to your Drupal database. The following steps presume you are doing this through phpMyAdmin, though it may work with other methods.
Currently, the members will have to request new passwords, as the Invision passwords are hashed with a salt (more info here). Boris Mann and myself will be working on carrying the correct passwords over too, and I will update this once the work is finished.
Step One: Export Invision Tables
- Log in to your phpMyAdmin where your Invision database resides.
- In most cases just visit "yoursite.com/cpanel", click 'MySQL' databases, and then the 'phpMyAdmin' link.
- Export 'ibf_members' and 'ibf_members_converge' tables (one at a time).
- To export, select your Invision database, then click the name of the table on the left. Up top, click the 'Export' tab, check the 'save as file' checkbox, and click "Go."
- Select your Invision Database, and Import each table seperately.
- Once you are in the Drupal database, click the 'SQL' tab up top, click 'Browse', and then click the bottom-most "Go" button. Do this for each Invision table that you previously exported (two total).
- Run SQL statements to import the data.
- While in your Drupal database, click on the 'SQL' tab once again. Enter the following code, and click "Go" after each one:
- Now you need to update your sequences table so that new users' UID will be higher than the last UID of the new users you just imported. To do this, follow these steps:
1)Select your 'users' table by click it in the left sidebar.
2)Click the 'Browse' tab up top.
3)Click the 'UID' link in your database twice to sort that columb by decending order. Write down the highest number.
4)Select your 'sequences' table.
5)Click 'Browse'.
6)Click the little pencil icon next to 'users_uid' to edit it.
7)Update the number (bottom right text box in the "ID" row) to the number you wrote down. Click 'Go'.
Step Two: Import Invision Tables into Drupal Database
Step Three: Moving the Data You Need To Drupal
INSERT INTO users (uid, name, mail, created) SELECT id, name, email, joined
FROM ibf_members;
UPDATE `users` SET `status` = 1 WHERE `status` = 0;
UPDATE `users_roles` SET `rid` = 1 WHERE `rid` = 0;
Finished
Your users, their email, and joined date have been successfully imported, and your Drupal database has been updated. The users will now have to request a new password. Drupal will ask them for their username and email (the ones they entered in Invision), and it will send them a new password that they can use to login. They can then change that password.
As I stated earlier, we are working on converting the passwords as well so that will not be necessary, and once that is done, this will be updated.
Take care and have fun!
Comments
Nice
Could you go here: http://drupal.org/node/271
Click the add a child page and add it there? If not, let me know and I will add it for you.
-sp
---------
Test sites and good habits: Drupal Best Practices Guide.
Misc Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Sure thing.
Doing that now :-)
-----------------
Josh Stevens
Nautilus7 Design | Buy Drupal T-Shirts, Mousepads, and more!
and approved
:)
-sp
---------
Test sites and good habits: Drupal Best Practices Guide.
Misc Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Thanks!
I made a quick change to remove some HTML that was in the code boxes, and it is no longer approved.
I appreciate the help.
-----------------
Josh Stevens
Nautilus7 Design | Buy Drupal T-Shirts, Mousepads, and more!
Are you sure that works?
Are you sure that works? IMHO, you need to add an entry for each user to the users_roles table. Also, your change will set all user accounts to "active" even those that were blocked before.
--
Drupal services
My Drupal services
--
Drupal services
My Drupal services
It works.
It works, as it is exactly what I've done on one of my sites with 0 problems. To add the roles, you could do the same step as when changing the activation, only switch to the proper table and field names.
Once we work out the password conversion, I will post an updated set of code that will only change the *new* accounts to active.
-----------------
Josh Stevens
Nautilus7 Design | Buy Drupal T-Shirts, Mousepads, and more!
I appreciate the work, but
I appreciate the work, but it's not truly done without the passwords. I'll wait for the password conversion insructions. Thanks in advance (and to killes for the tip).