From fc1d44d42ccde2ae9b81a62d3ba28a43fc6b2b40 Mon Sep 17 00:00:00 2001 From: Mauricio Dinarte Date: Wed, 4 Dec 2024 10:13:01 -0600 Subject: [PATCH] Customize upgrade_d7_user migration --- .../migrations/upgrade_d7_user.yml | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/drupal10/web/modules/custom/tag1_migration/migrations/upgrade_d7_user.yml b/drupal10/web/modules/custom/tag1_migration/migrations/upgrade_d7_user.yml index bad2e91..7e3aef7 100644 --- a/drupal10/web/modules/custom/tag1_migration/migrations/upgrade_d7_user.yml +++ b/drupal10/web/modules/custom/tag1_migration/migrations/upgrade_d7_user.yml @@ -1,18 +1,17 @@ -uuid: 0d03a681-dd7c-46f6-a9d9-0fc82b8525d2 -langcode: en -status: true -dependencies: { } id: upgrade_d7_user class: Drupal\user\Plugin\migrate\User -field_plugin_method: null -cck_plugin_method: null migration_tags: - 'Drupal 7' - Content -migration_group: migrate_drupal_7 + - user + - tag1_content label: 'User accounts' source: + key: migrate plugin: d7_user + high_water_property: + name: changed + alias: u process: uid: - @@ -34,6 +33,10 @@ process: - plugin: get source: created + changed: + - + plugin: get + source: changed access: - plugin: get @@ -44,8 +47,10 @@ process: source: login status: - - plugin: get + plugin: skip_on_empty source: status + method: row + message: 'User was not migrated because the account is blocked.' timezone: - plugin: get @@ -71,9 +76,12 @@ process: source: init roles: - - plugin: migration_lookup - migration: upgrade_d7_user_role + plugin: static_map source: roles + map: + 3: administrator + 4: content_editor + bypass: TRUE user_picture: - plugin: default_value @@ -86,11 +94,5 @@ destination: plugin: 'entity:user' migration_dependencies: required: - - upgrade_d7_user_role - optional: - - upgrade_d7_field_instance - upgrade_d7_file - - upgrade_user_picture_field_instance - - upgrade_user_picture_entity_display - - upgrade_user_picture_entity_form_display - - upgrade_d7_user_role + optional: { }