There's a lot of funky stuff going on with the hook_user_insert/update hooks. The hook_user_update hook fires are all user operations have been completed, so we shouldn't need to mess with the account object.

Comments

dave reid’s picture

Priority: Normal » Major
dave reid’s picture

Went through and reviewed user_save() for both D7 and D6. In D7 on both hook_user_insert and hook_user_update() provide a full user object and do not need any adjustment.

For D6, we only need to merge in $account->data and $account->roles on hook_user('insert'). If we change pathauto_user('update') to pathauto_user('after_update') we have a fully loaded user object.

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new3.64 KB
new2.89 KB

Status: Needs review » Needs work

The last submitted patch, 730987-pathauto-user-cleanup.patch, failed testing.

dave reid’s picture

Status: Needs work » Needs review
StatusFileSize
new5.03 KB
new2.89 KB

Erg, failed patch was a D6 patch.

dave reid’s picture

dave reid’s picture

Version: 7.x-1.x-dev » 6.x-2.x-dev
StatusFileSize
new3.34 KB

Committed to CVS for D7: http://drupal.org/cvs?commit=399668

Re-attaching D6 patch for testing.

dave reid’s picture

Status: Needs review » Fixed

Committed to CVS for 6.x-2.x:
http://drupal.org/cvs?commit=399684

Status: Fixed » Closed (fixed)

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