magento2_user.yml in Commerce Migrate 3.1.x
Same filename and directory in other branches
modules/magento/migrations/magento2_user.yml
File
modules/magento/migrations/magento2_user.ymlView source
- id: magento2_user
- label: User accounts
- audit: true
- migration_group: commerce_migrate_magento2
- migration_tags:
- - Content
- - Magento 2
- source:
- # Uses a custom source plugin to yield the top level category.
- plugin: magento2_csv
- # Change the path and filename to match your source CSV file.
- path: 'public://import/magento2_customer_address_20180618_003449.csv'
- # Change the enclosure character to suit your source CVS file.
- enclosure: "\""
- # Change the number of header rows to suit your source CVS file.
- header_offset: 0
- # The key field is the top level category determined from the 'categories'
- # column. The source plugin determines the vocabulary name and adds it to
- # the source row indexed by 'vocabulary'.
- ids: [_entity_id]
- process:
- exist:
- -
- plugin: entity_lookup
- source: _email
- value_key: mail
- entity_type: user
- -
- plugin: callback
- callable: is_null
- -
- plugin: skip_on_empty
- method: row
- name_first:
- -
- plugin: concat
- delimiter: ' '
- source:
- - firstname
- - middlename
- -
- plugin: callback
- callable: trim
- name:
- -
- plugin: concat
- delimiter: ' '
- source:
- - '@name_first'
- - lastname
- -
- plugin: skip_on_empty
- method: row
- mail:
- plugin: skip_on_empty
- source: _email
- method: row
- language: destination_default_langcode
- langcode:
- plugin: user_langcode
- source: '@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
- destination:
- plugin: entity:user