logintoboggan calls hook_user_update and does not supply $edit['original']. Additionally other 3rd party login or user save systems might also not supply this value.
Drupal Commerce should test for it's existence of $edit['original'] before it chooses to act on it.
Sample patch as proof of concept. Not sure if you'd prefer not to act, should it not exist.
| Comment | File | Size | Author |
|---|---|---|---|
| commerce-cart-no-edit-original.patch | 600 bytes | j0rd |
Comments
Comment #1
rszrama commentedFrom walkah's comment at https://api.drupal.org/comment/23088#comment-23088, it looks like instead we can depend on $account->original. Is that present in modules like logintoboggan?
Comment #2
j0rd commentedThe point of the function I believe is to update the email addresses in orders should the user change their email address.
With that said, if $edit['original'] is not available, then I assume you can assume, we're not updating the email address of the user and thus perhaps should not call the code.
So my patch would work with a && instead of a ||
Comment #3
rszrama commentedI like your logic, j0rd. Committing the revised approach from #2.
Commit: http://drupalcode.org/project/commerce.git/commitdiff/8d43c4c
Comment #5
Exploratus commentedThanks! Solved my issue!