Skip to content

Instantly share code, notes, and snippets.

@weaver299
Created February 18, 2019 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weaver299/6301e37dee2f2af1c61ff027f4ffaac2 to your computer and use it in GitHub Desktop.
Save weaver299/6301e37dee2f2af1c61ff027f4ffaac2 to your computer and use it in GitHub Desktop.
id: users
label: User Migration
source:
key: source_db
plugin: d7_user
destination:
plugin: entity:user
process:
uid:
plugin: skip_on_value
source: uid
value: 1
method: row
mail:
plugin: get
source: mail
status: status
name:
-
plugin: get
source: name
-
plugin: dedupe_entity
entity_type: user
field: name
temp_roles:
plugin: static_map
source: roles
map:
2: authenticated
3: administrator
4: content_manager
5: content_editor
6: webform_manager
7: webform_viewer
temp_deptstaff_role:
-
plugin: default_value
default_value: department_faculty_staff
-
plugin: explode # we're not actually breaking the value up, this is just to force it into an array
delimiter: ','
roles:
plugin: merge
source:
- '@temp_deptstaff_role'
- '@temp_roles'
created: created
changed: changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment