Skip to content

Instantly share code, notes, and snippets.

@dinarcon
Created August 11, 2019 12:21
Show Gist options
  • Select an option

  • Save dinarcon/7b5a79cb760d22e22da7de50a7e143cf to your computer and use it in GitHub Desktop.

Select an option

Save dinarcon/7b5a79cb760d22e22da7de50a7e143cf to your computer and use it in GitHub Desktop.
destination:
plugin: 'entity:user'
md5_passwords: true
migration_dependencies:
required:
- udm_user_pictures
optional: []
source:
plugin: embedded_data
data_rows:
- legacy_id: 101
public_name: 'Michele'
user_email: 'micky@example.com'
timezone: 'America/New_York'
user_password: 'totally insecure password 1'
user_status: 'active'
member_since: 'January 1, 2011'
user_roles: 'forum moderator, forum admin'
user_photo: 'P01'
ids:
legacy_id:
type: integer
mail: user_email
init: user_email
timezone: user_timezone
name:
- plugin: machine_name
source: public_name
- plugin: make_unique_entity_field
entity_type: user
field: name
postfix: _
process:
pass:
plugin: callback
callable: md5
source: user_password
destination:
plugin: 'entity:user'
md5_passwords: true
status:
plugin: static_map
source: user_status
map:
inactive: 0
active: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment