id: upgrade_d7_user
class: Drupal\user\Plugin\migrate\User
migration_tags:
  - 'Drupal 7'
  - Content
  - user
  - tag1_content
label: 'User accounts'
source:
  key: migrate
  plugin: d7_user
  high_water_property:
    name: changed
    alias: u
process:
  uid:
    -
      plugin: get
      source: uid
  name:
    -
      plugin: get
      source: name
  pass:
    -
      plugin: get
      source: pass
  mail:
    -
      plugin: get
      source: mail
  created:
    -
      plugin: get
      source: created
  changed:
    -
      plugin: get
      source: changed
  access:
    -
      plugin: get
      source: access
  login:
    -
      plugin: get
      source: login
  status:
    -
      plugin: skip_on_empty
      source: status
      method: row
      message: 'User was not migrated because the account is blocked.'
  timezone:
    -
      plugin: get
      source: timezone
  langcode:
    -
      plugin: user_langcode
      source: entity_language
      fallback_to_site_default: false
  preferred_langcode:
    -
      plugin: user_langcode
      source: language
      fallback_to_site_default: true
  preferred_admin_langcode:
    -
      plugin: user_langcode
      source: language
      fallback_to_site_default: true
  init:
    -
      plugin: get
      source: init
  roles:
    -
      plugin: static_map
      source: roles
      map:
        3: administrator
        4: content_editor
      bypass: TRUE
  user_picture:
    -
      plugin: default_value
      source: picture
      default_value: null
    -
      plugin: migration_lookup
      migration: upgrade_d7_file
destination:
  plugin: 'entity:user'
migration_dependencies:
  required:
    - upgrade_d7_file
  optional: {  }
