-
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 inpublic function prepareRow()
it shows file path(no effect even file path is correct)
and inpublic function prepare()
it needs fid