I recently found out about this little gem after doing a little more research into VBulletin and Drupal (which I just recently started using) integration. I was attempting to use VBDrupal, but the installation didn't go as smoothly as I had hoped. This solution seems a lot more promising as it doesn't mess with any core files for either program. Now onto my problem:
I installed DrupalVB successfully using tassoman's modified version. The forum blocks display the correct information. The only problem I'm having now is logging in. DrupalVB seems to have copied the user accounts for drupal over to vb successfully, but I still can't login with any account. I get MySQL errors when attempting to login through drupal and when trying to login with the same account in vbulletin, it fails to recognize the login info. I took a look at the data stored in the user tables for both (users for drupal, vb3_user for vbulletin) and for some reason, the hashes for the passwords don't match. I assume this is why I can't login. Any ideas?
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | prefix.patch.txt | 17.31 KB | valcker |
| #13 | md5.patch_0.txt | 399 bytes | valcker |
| #12 | md5.patch.txt | 399 bytes | valcker |
Comments
Comment #1
tassoman commentedI think i have the same problem so password hash must be wrong. I untouched this. So should be the problem.
Btw I think for the next version we should use the application connector and rewrite the login/logout/adduser/deluser methods using the VB plugin. Could reduce pains handling code, and follow more straightly the integration people at vbdrupal asks to this project.
Personally I don't like the vbdrupal forking. For people not wanting hard integration but only user sync and small stats outside forum, this module is fine.
Comment #2
rszrama commentedheh Like most of the other issues here, I've never run into this. I'm really not sure what makes it run on my system and no one else's. Maybe it's because I was doing testing in a Windows environment and not Linux? Don't see why this would change things, but I don't know what could be going on that I just don't know about. ^_^ Basically, like I've said before, I don't have time to do testing on this. The module met my boss's needs, and he had more pressing things to put me on. I am happy to commit changes to the module or even bring someone else on as a contributor to coordinate changes. If anyone of you guys can code and are willing, post it here or send me an mail. = )
Comment #3
kgraphik commentedI forgot to post the MySQL errors I get when trying to login. Here they are:
I really do need this problem worked out.
Comment #4
getel commentedMaking some tests with tassoman version i found out that when creating accounts on vb no entries are created in 'userfield' and in 'usertextfield' .
Adding those records seems to fix the account creation now .
Here comes the snippet.
Insert it at line 176 in drupalvb.inc.php
Comment #5
tassoman commentedHow to put our edits into CVS ?
Comment #6
Andrew Thomas commentedif i open in wordpad i cant go to line 176
and if i open in notepad its not formatted and all the lines are together ith the lil [] things showing where the line breaks should be
so where exactly do i put this code
//---- fixing user creation
$userid = mysql_insert_id();
$query = "INSERT INTO ".VB_PREFIX."userfield VALUES (".$userid.", NULL, '', '', '', '')";
$result = mysql_query($query, $vblink);
$query = "INSERT INTO ".VB_PREFIX."usertextfield VALUES (".$userid.", NULL, NULL, NULL, NULL, '', NULL, NULL)" ;
$result = mysql_query($query, $vblink);
Comment #7
Vaughan commentedI'm having the same problem, both on our dev/staging server (Apache on IIS/Windows, MySQL) and the live server (PHP, MySQL).
Logging in to Drupal creates a user in the Users, UserField and UserTextField. However the password seems to be mis-hashed. I know that Vbulletin uses a different hashing method, but it looks like the drupalvb.module caters for that, however it still seems to be an incorrect password.
Anyone else solved this problem?
Thanks
Vaughan
Comment #8
rszrama commentedHmm.. from the sound of your post, I'm assuming you're using the CVS version? If so, I'm curious to know if you modified drupalvb.inc and set VB_LICENSE to the correct value for your license. If so.. maybe there's something else they do to these passwords that I don't know about. ; )
If you're not using CVS, try that and lemme know... and if you are, there's actually some continued work going on to try and make this thing work correctly. It's slow-moving, but it's still moving. Thanks for posting the bug report!
Comment #9
valcker commentedI have the same problem as Vaughan and I'm using latest cvs version of drupalvb. Nothing changed, password is still wrong. They are using different hashing method.
Comment #10
valcker commentedI have the same problem as Vaughan and I'm using latest cvs version of drupalvb. Nothing changed, password is still wrong. They are using different hashing method.
Comment #11
rszrama commentedThanks guys. Perhaps it changes depending on version of vB? Are you using the latest?
Also, it would be helpful if you have the know-how to try and tweak the function a little bit for it to work. Bizzie here @ drupal.org has been playing with it and I believe has the login stuff working... when I get and test a good patch, I'll be sure to update the code!
Comment #12
valcker commentedHi everybody. I've created a patch that fixes problem with wrong md5 hash. Problem was in function
_drupalvb_create_vb_user(....). There was a line$passhash = md5(md5($password) . $salt), the probem is that $password is already an md5_hash, because this function is called someway like this:.._drupalvb_create_vb_user(...md5($password)...)...I've applied patch that fixes that problem.
Thank you.
Comment #13
valcker commentedHi everybody. I've created a patch that fixes problem with wrong md5 hash. Problem was in function
_drupalvb_create_vb_user(....). There was a line$passhash = md5(md5($password) . $salt), the probem is that $password is already an md5_hash, because this function is called someway like this:.._drupalvb_create_vb_user(...md5($password)...)...I've applied patch that fixes that problem.
Thank you.
Comment #14
valcker commentedI've created one more patch, that adds prefix support to this module. You should apply md5.patch before.
P.S.: sorry for double-comments - my browser sends request for 2 times, and only on drupal.org.
Comment #15
rszrama commentedExcellent. I had done the work for prefixes, but I suppose my breaking the password hash prevented me from ever testing it. ^_^ I'll try to test/commit these as soon as possible. (I'm assuming these are against the CVS version?)
Comment #16
valcker commentedYes, it's againt the CVS version.
Comment #17
rszrama commentedvalcker, was able to test the first fix and it worked great. Just installed a clean Drupal and a clean vBulletin and had no problem "integrating" them. I'm logging in/out, changing password, and whatever else just fine. I don't have a CVS program installed right now, but I'll get that fix applied ASAP (read: tomorrow). It'll take me a little more time to work in the second patch. ;) But thanks for doing that! I had done it but thought I broke something in the process due to the password mismatching bug.
We'll have a working module yet!
Comment #18
rszrama commentedWell.. decided to download Smart CVS and apply the patch. Also, I'm a little unclear on how the tagging works, but I'm trying to get the current CVS to be tagged as the official 4.7 release so the bad old code is no longer around...
Moving this to complete and opening a new issue for database prefixing.
Comment #19
rszrama commentedComment #20
(not verified) commented