id: agaric_user
migration_group: agaric
label: Agaric Users
source:
  plugin: d7_user
destination:
  plugin: entity:user
process:
  name: name
  pass: pass
  mail: mail
  created: created
  access: access
  login: login
  status: status
  timezone: timezone
  init: init
  field_bio: field_bio
  roles:
    -
      plugin: static_map
      source: roles
      map:
        1: anonymous
        2: authenticated
        3: staff
        4: administrator
        5: past
        6: partner
    -
      plugin: role_generate
      entity_type: user_role
      value_key: id
  field_gpg_public_key/target_id:
    -
      plugin: extract
      source: field_gpg_public_key
      default: ''
      index:
        - 0
        - fid
    -
      plugin: skip_on_empty
      method: process
    -
      plugin: migration_lookup
      migration: agaric_file
  user_picture:
    -
      plugin: default_value
      source: picture
      default_value: null
    -
      plugin: migration_lookup
      migration: agaric_file
migration_dependencies:
  optional:
    - agaric_file

