When updating the email field in drupal, it doesn't get sync'd to phpBB.

I think it's because phpbbforum_user_update is run after the user is being saved, therefor the comparisson:

$updatemail = ($account->mail != $edit['mail']) ? $mail : '';

never gives the right result as $account->mail already is the same as $edit['mail'].

Enclosed patch adds the $account->mail variable to the $edit in hook_user_presave, so that it can be checked against in the update function. Please review!

Something similar should probably be done for the username...

Comments

fizk’s picture

Issue tags: +ToDo
StatusFileSize
new1.03 KB

Thanks, I've tweaked your patch a bit.

fizk’s picture

StatusFileSize
new624 bytes

Here's a better patch.

fizk’s picture

Title: Email synchronization Drupal -> phpBB » Updating user email in Drupal does not sync to phpBB
Status: Needs review » Closed (fixed)