Hey there,

Insert and update ops in hook_user() result in form_build_id being stored in the data field of the users table. I.e it's not unset before the data field is updated with all remaining fields in $edit. Patch to follow.

--
Sammy Spets
Synerger
http://synerger.com

Comments

sammys’s picture

Status: Active » Needs review
StatusFileSize
new643 bytes

Here is the patch.

bdragon’s picture

Version: 6.0-rc3 » 6.x-dev
Status: Needs review » Needs work

The code from this section appears to have changed.

sammys’s picture

Status: Needs work » Needs review

bdragon: In what way has it changed? The patch still applies...

sun’s picture

Version: 6.x-dev » 7.x-dev
Status: Needs review » Needs work

Bugs get fixed in HEAD first.

dave reid’s picture

Version: 7.x-dev » 6.x-dev

This bug is actually fixed in 7.x. I tried editing and adding user accounts and there was no form_build_id variable in $user->data. Moving this back to 6.x.

cwgordon7’s picture

Status: Needs work » Reviewed & tested by the community

This patch still applies and fixes the problem.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, user.module.form_build_id.200802081121.patch, failed testing.

Jorrit’s picture

Assigned: sammys » Jorrit
Status: Needs work » Needs review
StatusFileSize
new623 bytes
new607 bytes

I have updated the patch to apply to the latest version of drupal 6.x. I have two possible solutions. The first one is just ignoring the key form_build_id, but this leaves the existing value in the array. Given that Drupal 6 has been around for a long time, I suspect that many people have this value in their data field. So the second patch is slightly different: it will unset the form_build_id explicitly.

Jorrit’s picture

StatusFileSize
new824 bytes
new814 bytes

I have rerolled the patches against the latest -dev.

Status: Needs review » Needs work

The last submitted patch, bug-219105-usersave-v2.new_.patch, failed testing.

Jorrit’s picture

Status: Needs work » Needs review
StatusFileSize
new996 bytes
new984 bytes

Thanks to Eclipse for not creating git-compatible patches ... retry.

ufku’s picture

Status: Needs review » Needs work

I think Heine's patch at #451770: Don't save form_build_id in data is more correct as the form_build_id comes from the profile form and it should be unset in the relevant submit handler.
Fixing the previously saved data should be done in a separate process, not in user_save.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.