sf_user module implements hook_user(op='update') and then uses user_load(uid) in sf_user_export(). However, hook_user(op='update') is called before the new account data is saved to the database (@see http://api.drupal.org/api/drupal/modules--user--user.module/function/use...).
Solution: this sf_user should implement 'after update' to be able to export on new account object.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | salesforce-983192-9.patch | 790 bytes | kostajh |
| #3 | salesforce-sf_user-983192-2.patch | 693 bytes | recrit |
| #1 | salesforce-sf_user-983192.patch | 694 bytes | recrit |
Comments
Comment #1
recrit commentedpatch attached changes hook_user 'update' to 'after update'
Comment #2
EvanDonovan commented$op should be "after_update" according to docs: http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hoo...
Comment #3
recrit commentedthanks, good catch... i typed it wrong when rolling the patch for the 2.x head.
updated patch is attached.
Comment #4
EvanDonovan commentedYou should set back to "needs review" once you correct a patch. Will try to get to this in the next few weeks.
Comment #5
aaronbaumanThis is a one-liner, so unless anyone can offer a reason why changing from "update" to "after_udpate" would have adverse affects, this will go into dev in the next week or so.
Comment #6
EvanDonovan commentedSeems like this is a clear fix (I didn't actually test the patch, but the logic is sound).
Comment #7
aaronbaumanthis is in
http://drupal.org/cvs?commit=471092
thanks for the contrib
Comment #9
kostajh commentedSorry to re-open this, but I think it needs one more fix.
In hook_user of sf_user.module
(!$auto_update && $op == 'update'))should be
(!$auto_update && $op == 'after_update'))Patch is against 6.x-2.x-dev.
Comment #10
aaronbaumangood catch, committed to dev.
thanks
Comment #11
aaronbaumanComment #12
EvanDonovan commentedWill be in 7.x-2.x-dev.
Comment #13
EvanDonovan commented