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.

Comments

recrit’s picture

StatusFileSize
new694 bytes

patch attached changes hook_user 'update' to 'after update'

EvanDonovan’s picture

Status: Active » Needs work
recrit’s picture

StatusFileSize
new693 bytes

thanks, good catch... i typed it wrong when rolling the patch for the 2.x head.
updated patch is attached.

EvanDonovan’s picture

Status: Needs work » Needs review

You should set back to "needs review" once you correct a patch. Will try to get to this in the next few weeks.

aaronbauman’s picture

This 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.

EvanDonovan’s picture

Status: Needs review » Reviewed & tested by the community

Seems like this is a clear fix (I didn't actually test the patch, but the logic is sound).

aaronbauman’s picture

Status: Reviewed & tested by the community » Fixed

this is in
http://drupal.org/cvs?commit=471092

thanks for the contrib

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kostajh’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new790 bytes

Sorry 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.

aaronbauman’s picture

Status: Needs review » Fixed

good catch, committed to dev.
thanks

aaronbauman’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev
Status: Fixed » Patch (to be ported)
Issue tags: +D7 porting
EvanDonovan’s picture

Status: Patch (to be ported) » Fixed

Will be in 7.x-2.x-dev.

EvanDonovan’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev

Status: Fixed » Closed (fixed)
Issue tags: -D7 porting

Automatically closed -- issue fixed for 2 weeks with no activity.