viarun
02-15-2010, 10:00 PM
For anyone that's migrating from IPB ( Invision Power Board ) 2.X to vBulletin 4.x. The reason I built this is because the impex import system does not migrate passwords for a move from IPB to vBulletin. This is largely because the passwords are hashed differently, so there's no way to "convert" a password.
This plugin takes a different approach, where you keep the old IPB passwords around, and authenticate users against it first. If they authenticate successfully, then we sync the password the user typed in with vBulletin. Voila...a migration without making your users reset their passwords.
Borrowed heavily from ideas by malcolmx (https://vborg.vbsupport.ru/member.php?u=35084) in his LDAP Auth Plugin. (https://vborg.vbsupport.ru/showthread.php?t=231909&page=2) THANKS MALCOLMX!
Installation Notes:
1. copy ipbAuth directory to your vb forum installation directory
2. change the path to controller.php directory in ipb-plugin.xml
3. copy the hooks_ipb.xml to FORUM_ROOT/includes/xml directory
4. in login.php search for:
if ($vbulletin->GPC['vb_login_username'] == '')
{
eval(standard_error(fetch_error('badlogin', $vbulletin->options['bburl'], ....
}
And add this hook statement like so:
(if ($vbulletin->GPC['vb_login_username'] == '')
{
eval(standard_error(fetch_error('badlogin', $vbulletin->options['bburl'], ....
}
($hook = vBulletinHook::fetch_hook('ipb_login_hook')) ? eval($hook) : false;
5. activate plugin system (if not done already) in admincp
6. in admin cp import the product at "Plugins & Products -> Download / Upload Plugins", use "Import Plugin Definitions XML File" at the bottom of the page, example import input './ipbAuth/ipb-plugin.xml'
7. in includes/class_bootstrap.php search for:
$show['nopasswordempty']
then change:
defined('DISABLE_PASSWORD_CLEARING') ? 1 : 0;
to:
defined('DISABLE_PASSWORD_CLEARING') ? 0 : 1;
( note that this causes the browser to skip hashing the password in javascript, and passwords will be sent cleartext to the server. technically, a security risk, although many, many, bulletin board systems do this by default. This is the only sensible way to get the cleartext password to be synced though. no other clean way to sync IPB to vB. You can, of course, turn this whole plugin off after most of your users have migrated, and then remove this change. The passwords are properly hashed in the database, and not written to disk, so the risk is relatively low.)
8. Configure the database settings in ipbconfig.inc.php ... this should point to your IPB database that has the members_converge table in it. Be sure to supply a username and password that can read and update the table. Make a copy of the database first...before you turn this plugin on!
9. Make a backup copy of the old IPB database first...before you turn this plugin on!
10. Test
A little story: The whole reason this happened was that IPB treated me like crap. I was a long-time customer of their hosted board service on their 2.X product. Last weekend, I had planned to upgrade to 3.x, and move my board to my own servers. So, I logged into their site and purchased the 3.x product.
It popped up an error that basically said they had flagged the purchase, and were going to keep my money, but not let me download the software until I could be "verified"...perhaps up to 2 days later. So, I decided I didn't like being treated like a thief. I bought a brand-new copy of vB, and wrote this plugin to ease the migration for my board members. I'm posting it here so that hopefully, more people can move away from IPB. Karma rocks.
Download
This plugin takes a different approach, where you keep the old IPB passwords around, and authenticate users against it first. If they authenticate successfully, then we sync the password the user typed in with vBulletin. Voila...a migration without making your users reset their passwords.
Borrowed heavily from ideas by malcolmx (https://vborg.vbsupport.ru/member.php?u=35084) in his LDAP Auth Plugin. (https://vborg.vbsupport.ru/showthread.php?t=231909&page=2) THANKS MALCOLMX!
Installation Notes:
1. copy ipbAuth directory to your vb forum installation directory
2. change the path to controller.php directory in ipb-plugin.xml
3. copy the hooks_ipb.xml to FORUM_ROOT/includes/xml directory
4. in login.php search for:
if ($vbulletin->GPC['vb_login_username'] == '')
{
eval(standard_error(fetch_error('badlogin', $vbulletin->options['bburl'], ....
}
And add this hook statement like so:
(if ($vbulletin->GPC['vb_login_username'] == '')
{
eval(standard_error(fetch_error('badlogin', $vbulletin->options['bburl'], ....
}
($hook = vBulletinHook::fetch_hook('ipb_login_hook')) ? eval($hook) : false;
5. activate plugin system (if not done already) in admincp
6. in admin cp import the product at "Plugins & Products -> Download / Upload Plugins", use "Import Plugin Definitions XML File" at the bottom of the page, example import input './ipbAuth/ipb-plugin.xml'
7. in includes/class_bootstrap.php search for:
$show['nopasswordempty']
then change:
defined('DISABLE_PASSWORD_CLEARING') ? 1 : 0;
to:
defined('DISABLE_PASSWORD_CLEARING') ? 0 : 1;
( note that this causes the browser to skip hashing the password in javascript, and passwords will be sent cleartext to the server. technically, a security risk, although many, many, bulletin board systems do this by default. This is the only sensible way to get the cleartext password to be synced though. no other clean way to sync IPB to vB. You can, of course, turn this whole plugin off after most of your users have migrated, and then remove this change. The passwords are properly hashed in the database, and not written to disk, so the risk is relatively low.)
8. Configure the database settings in ipbconfig.inc.php ... this should point to your IPB database that has the members_converge table in it. Be sure to supply a username and password that can read and update the table. Make a copy of the database first...before you turn this plugin on!
9. Make a backup copy of the old IPB database first...before you turn this plugin on!
10. Test
A little story: The whole reason this happened was that IPB treated me like crap. I was a long-time customer of their hosted board service on their 2.X product. Last weekend, I had planned to upgrade to 3.x, and move my board to my own servers. So, I logged into their site and purchased the 3.x product.
It popped up an error that basically said they had flagged the purchase, and were going to keep my money, but not let me download the software until I could be "verified"...perhaps up to 2 days later. So, I decided I didn't like being treated like a thief. I bought a brand-new copy of vB, and wrote this plugin to ease the migration for my board members. I'm posting it here so that hopefully, more people can move away from IPB. Karma rocks.
Download