migrate_plus.migration.d7_users.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. id: d7_users
  2. label: User accounts
  3. migration_group: d7_materio
  4. audit: true
  5. migration_tags:
  6. - Drupal 7
  7. - Content
  8. class: Drupal\user\Plugin\migrate\User
  9. source:
  10. plugin: d7_user
  11. destination:
  12. plugin: entity:user
  13. process:
  14. # If you are using this file to build a custom migration consider removing
  15. # the uid field to allow incremental migrations.
  16. # uid: uid
  17. name: name
  18. pass: pass
  19. mail:
  20. -
  21. plugin: skip_on_value
  22. equals: true
  23. source: mail
  24. method: row
  25. value:
  26. - "dev@g-u-i.net"
  27. - "admin@g-u-i.net"
  28. -
  29. plugin: default_value
  30. source: mail
  31. default_value: null
  32. created: created
  33. access: access
  34. login: login
  35. status: status
  36. timezone: timezone
  37. langcode:
  38. plugin: user_langcode
  39. source: entity_language
  40. fallback_to_site_default: false
  41. preferred_langcode:
  42. plugin: user_langcode
  43. source: language
  44. fallback_to_site_default: true
  45. preferred_admin_langcode:
  46. plugin: user_langcode
  47. source: language
  48. fallback_to_site_default: true
  49. init: init
  50. # roles:
  51. # plugin: migration_lookup
  52. # migration: d7_user_role
  53. # source: roles
  54. roles:
  55. plugin: static_map
  56. source: roles
  57. default_value: 2
  58. map:
  59. 1: "anonymous"
  60. 2: "authenticated"
  61. 3: "admin"
  62. 4: "root"
  63. 5: "contact_company"
  64. 6: "adherent"
  65. 7: "free_user"
  66. 8: "premium"
  67. 9: "unverified"
  68. 10: "student"
  69. 11: "alpha_testeur"
  70. 12: "translator"
  71. 13: "admin_showroom"
  72. user_picture:
  73. -
  74. plugin: default_value
  75. source: picture
  76. default_value: null
  77. -
  78. plugin: migration_lookup
  79. migration: d7_file
  80. field_company:
  81. plugin: migration_lookup
  82. migration: d7_taxonomy_term_company
  83. source: field_company
  84. field_showroom:
  85. plugin: migration_lookup
  86. migration: d7_taxonomy_term_showroom
  87. source: field_showroom
  88. field_memo: field_memo
  89. migration_dependencies:
  90. required:
  91. - d7_allpublicfiles
  92. # optional:
  93. # - d7_field_instance
  94. # - d7_file
  95. # - language
  96. # - default_language
  97. # - user_picture_field_instance
  98. # - user_picture_entity_display
  99. # - user_picture_entity_form_display