Показать сообщение отдельно
Старый 26.08.2013, 08:31 Вверх   #74
Коварный тип
 
Аватар для Serberg
Serberg вне форума
Доп. информация
По умолчанию

Там написано:

I'm hoping that someone can save me many more hours of banging my head against the wall. I've done a test impex of phpbb3 to vb3.8 and it has gone really well, except the age old problem of passwords importing. I know the official line is to just get everyone to reset their passwords, but that isn't an option for me as valid email addresses are not required at registration, so probably 75% of the email addresses on accounts are just pure nonsense meaning that password resets will not be possible.

I found lurking around on here some code to import the passwords into vb4 on first login by checking the plain text password against the phpbb database with the phpbb encoding and if it matches then to update the password in the vbulletin database, but i haven't been able to get it working with vb3.8, although i will admit i am very rusty these days.

Basically what I need to do is really understand how the phpbb passwords are encoded then I can run a hopefully simple bit of code to encode the plain text password that way and then can do something along the lines of

Код:
if($phpbbpw == $phpbbuserpw)
{
// update vb password using dm
// replace vb_user.importid with 0
}
else
{
// throw invalid login error
}
of course to do this, I'll first be doing

Код:
$getuserid = $vbulletin->db->query_first("SELECT importid FROM vb_user WHERE username = '" . $vbulletin->GPC['vb_login_username'] . "'");
$phpbbuserid = $getuserid['importuserid'];

if ($phpbbuserid != '0')
{

$ptpassword = $vbulletin->GPC['vb_login_password'];

// encode $ptpassword to phpbb standards

$getphpbbpw = $vbulletin->db->query_first("SELECT user_password FROM phpbb_users WHERE user_id = '$phpbbuserid'");
$phpbbpw = $getphpbbpw['user_password'];

$phpbbuserpw = encoded $ptpassword for phpbb

check $phpbbuserpw against $phpbbpw for match etc

}
this whole thing is giving me so much grief though, so hoping someone might have some ideas. It really is just getting the phpbb encoding making sense that is the problem. I've been pouring over the files and can't make head nor tail of it.

I know it isn't an ideal way of doing it, especially as I am just coding direct into login.php and not using any plugins of anything (old school here still unfortunately - plus no useful hooks anyway), but any pointers, or if anyone has been able to do this successfully before, then that would be awesome. I really don't want to have to renew a licence just to use the vb4 code i found, as that will only result in having a lot more work to do, and a whole new system to learn which tbh i cba doing when i know vb3 like the back of my hand and it does exactly what i want and need it to do.
  Ответить с цитированием
 
Время генерации страницы 0.05096 секунды с 10 запросами