phpbb and drupal databases not sync

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by airali on February 17, 2008 at 3:50pm

I installed phpbb module. (drupal 5.3 and phpbb3)
If I change a password in phpbb profile, it doesn't works in drupal.
if drupal admin deletes a user in drupal, that user doesn't work any longer, because I have to log from drupal; but if I try to create again that username, it says

"user warning: Duplicate entry 'utente' for key 2 query: INSERT INTO phpbb_users (user_id,group_id,username, username_clean, user_password,user_regdate,user_email, user_options,user_lang, user_timezone,user_sig, user_lastpage,user_permissions,user_from, user_aim,user_yim,user_msnm,user_jabber, user_website,user_occ ,user_interests)
............etc

So I think that changes doesn't affect completely both databases.
Why?

SOLVED by arkepp:

Edit the following files as described, or download the latest version of the module, where these files have already been changed.

functions_drupal.php , line 46:
function update_drupal($user_id = false, $sql_ary = false, $password = false)

ucp_profile.php, line 229:
update_drupal(false, false, $data['new_password']);

acp_users.php, line 815:
update_drupal($user_id,$sql_ary,$data['new_password']);

Comments

I second this...

Posted by yosmc on February 19, 2008 at 12:49am

The man is 100% right! It's quite a bug that can be easily reproduced: if you update the password in phpBB, the change does NOT happen in Drupal. update_drupal() checks if $password exists, but since this variable is never populated (I believe the last variable in ucp_profile.php to carry the correct value is $data['new_password']) the password never gets updated either.

This one's especially serious if you merge an already existing phpBB - users need to get themselves new passwords due to different encoding, but how should they?

Can't comment on the other bug but I have no doubt that it exists. ;)

Arkepp, kudos to you for putting this script together, but I do hope you see this soon!

strange that you 2 having

Posted by demon326 on February 19, 2008 at 9:52am

strange that you 2 having the problem..., on my 2 sites with the module its all working perfect...,did you guys used the prededited files or did you do the edits youre self?

I used pre-edited files (i

Posted by airali on February 19, 2008 at 11:30am

I used pre-edited files (i know hardly anything of php), except for editing paths in configuration.inc, of course.

How?

Posted by yosmc on February 19, 2008 at 11:46pm

Demon, please look into the drupal_update function and see for yourself. When and how is $password defined?

I just looked into it and i

Posted by demon326 on February 20, 2008 at 10:46am

I just looked into it and i think youre right..., but the strang thing is i realy dont have problems with the module for drupal 5.7

i just edited the password off my test account and it looks like there is no problem.. its also updated in drupal and arkepp dident change the phpbb side sinds phpbb RC8 and gold...., we will have to wait for arkepp to give a clear awnser i think ..

Quick fix

Posted by yosmc on February 20, 2008 at 8:48pm

I've replaced update_drupal() in ucp_profile.php with the following:

update_drupal(false, false, $data['new_password']);

That seems to work for me (at least until arkepp comes up with something official).

imm good that its working on

Posted by demon326 on February 20, 2008 at 8:55pm

imm good that its working on youre forum :),but still its strange only 2 people have the problem so maybe there is a mistake in the premodded files?

functions_drupal.php , line

Posted by arkepp on February 21, 2008 at 7:48am

functions_drupal.php , line 46:
function update_drupal($user_id = false, $sql_ary = false, $password = false)

ucp_profile.php, line 229:
update_drupal(false, false, $data['new_password']);

acp_users.php, line 815:
update_drupal($user_id,$sql_ary,$data['new_password']);

Enough said? Please correct the statements above, Drupal's threading makes it hard to see what the conclusion is at first glance.

I appreciate bug reports, but please test your theories on http://drupal.i1media.no first

Got it

Posted by yosmc on February 21, 2008 at 9:28pm

Thanks for the response!

phpbb

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /