The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I need to import a database of usernames and passwords into a new vB installation. The passwords are encrypted using perl like so:
$encryptedpassword = crypt($password,"aa"); I would like to hack vB to recognize either the standard vB password or the imported (encrypted) passwords. I'm thinking that users with the old style password will be able to update their passwords as normal, and the old password will be replaced by a vB-format one. Will this work? If so, could someone give me some pointers on where to start? Thanks. |
#2
|
||||
|
||||
![]() Quote:
|
#3
|
|||
|
|||
![]()
Sort of - I'm migrating from WebBBS. I'm not going to import the existing messages but I do need to import the usernames and passwords. The complication is that I've been using my own custom MySQL database to manage my WebBBS users, since the WebBBS username/password system is useless.
So the passwords are encrypted using the same format as WebBBS but stored in a different way (MySQL as opposed to WebBBS profiles). I don't believe there's any way to directly import the passwords into the standard vB format. Actually I don't even know how vB formats passwords yet - I haven't got that far. |
#4
|
|||
|
|||
![]()
Please, can anyone help? All I want to know is where to find the code which says "If the password entered in the form equals the password in the database..." so I can add "...OR if it equals the old encrypted version".
If I can just get some guidance on where to start I'm happy to try and figure out the rest. |
#5
|
||||
|
||||
![]()
login.php is the file you need to look at. But if i were you, i'd have the users reset their passwords, or i'd make a script to autogenerate new passwords and mail them.
|
#6
|
|||
|
|||
![]()
Thanks rake. Unfortunately a huge number of our users don't have email addies in the database, and can't add them. It's a long story - I never quite finished writing my user management script for WebBBS when I gave up on it altogether. Now I'm stuck in a horrible no-mans land, with a password/email catch-22.
Anyway, if the only file I need to look at is login.php, I'll have a look and see what I can figure out. Thanks again. |
#7
|
||||
|
||||
![]()
actually, you need to look at the includes/functions_login.php file, very last function in the file. Add your code there.
![]() |
#8
|
|||
|
|||
![]()
Ah, I see it. So I believe I need to do something like:
Code:
if ( $bbuserinfo['password'] != iif($password AND !$md5password, md5(md5($password) . $bbuserinfo['salt']), '') AND $bbuserinfo['password'] != md5($md5password . $bbuserinfo['salt']) AND $bbuserinfo['password'] != iif($md5password_utf, md5($md5password_utf . $bbuserinfo['salt']), '') // Add a line here: // AND $bbuserinfo['password'] != (this bit I haven't figured out yet) ) { return false; } |
#9
|
||||
|
||||
![]()
AND $bbuserinfo['password'] != crypt($password,"aa")
that would be it... ![]() |
#10
|
|||
|
|||
![]()
Dammit, that simple!? For some reson I thought PHP handled it differently. As you can see, I'm a PHP newbie. I've got to go away for a while now but I'll try this as soon as I get back. Thanks heaps for your help rake.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|