My two bits on Drupal Migrate user pictures

-
Free tags: 

My two bits on user pictures(Migrate 2.5, D7):

  • Use a separate UserPictureMigration class (you see new IDs from file_managed table)
  • In UserMigration, prepare(), use $this->handleSourceMigration('UserPicture', $row->uid); to assign fid
  • Under normal user picture upload, a new entry on file_usage is created. You may want to insert a row too, during complete() and completeRollback()

Spend me two full day on this. Very confusing:
$this->addFieldMapping('picture')->defaultValue() need an int
but in
public function prepareRow() it shows file path(no effect even file path is correct)
and in
public function prepare() it needs fid

http://drupal.org/node/1349632#comment-7348466

Google