migrate_plus.migration.d7_users.yml 2.2 KB

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