Add the bio and the gpg field in the users.
Also, the user migration was updated to migrate the data of these fields.
This commit is contained in:
parent
f9db6433cd
commit
14e829fd66
9 changed files with 198 additions and 33 deletions
|
@ -3,11 +3,15 @@ langcode: en
|
||||||
status: true
|
status: true
|
||||||
dependencies:
|
dependencies:
|
||||||
config:
|
config:
|
||||||
|
- field.field.user.user.field_bio
|
||||||
|
- field.field.user.user.field_gpg_public_key
|
||||||
- field.field.user.user.user_picture
|
- field.field.user.user.user_picture
|
||||||
- image.style.thumbnail
|
- image.style.thumbnail
|
||||||
module:
|
module:
|
||||||
|
- file
|
||||||
- image
|
- image
|
||||||
- path
|
- path
|
||||||
|
- text
|
||||||
- user
|
- user
|
||||||
_core:
|
_core:
|
||||||
default_config_hash: cAoTuTfmGrGB_89qPV_cTRlA7NXOWtLCLePKVX4SO3A
|
default_config_hash: cAoTuTfmGrGB_89qPV_cTRlA7NXOWtLCLePKVX4SO3A
|
||||||
|
@ -19,12 +23,34 @@ content:
|
||||||
account:
|
account:
|
||||||
weight: -10
|
weight: -10
|
||||||
region: content
|
region: content
|
||||||
|
settings: { }
|
||||||
|
third_party_settings: { }
|
||||||
contact:
|
contact:
|
||||||
weight: 5
|
weight: 5
|
||||||
region: content
|
region: content
|
||||||
|
settings: { }
|
||||||
|
third_party_settings: { }
|
||||||
|
field_bio:
|
||||||
|
weight: 32
|
||||||
|
settings:
|
||||||
|
rows: 9
|
||||||
|
summary_rows: 3
|
||||||
|
placeholder: ''
|
||||||
|
third_party_settings: { }
|
||||||
|
type: text_textarea_with_summary
|
||||||
|
region: content
|
||||||
|
field_gpg_public_key:
|
||||||
|
weight: 31
|
||||||
|
settings:
|
||||||
|
progress_indicator: throbber
|
||||||
|
third_party_settings: { }
|
||||||
|
type: file_generic
|
||||||
|
region: content
|
||||||
language:
|
language:
|
||||||
weight: 0
|
weight: 0
|
||||||
region: content
|
region: content
|
||||||
|
settings: { }
|
||||||
|
third_party_settings: { }
|
||||||
path:
|
path:
|
||||||
type: path
|
type: path
|
||||||
weight: 30
|
weight: 30
|
||||||
|
@ -34,6 +60,8 @@ content:
|
||||||
timezone:
|
timezone:
|
||||||
weight: 6
|
weight: 6
|
||||||
region: content
|
region: content
|
||||||
|
settings: { }
|
||||||
|
third_party_settings: { }
|
||||||
user_picture:
|
user_picture:
|
||||||
type: image_image
|
type: image_image
|
||||||
settings:
|
settings:
|
||||||
|
|
|
@ -3,10 +3,14 @@ langcode: en
|
||||||
status: true
|
status: true
|
||||||
dependencies:
|
dependencies:
|
||||||
config:
|
config:
|
||||||
|
- field.field.user.user.field_bio
|
||||||
|
- field.field.user.user.field_gpg_public_key
|
||||||
- field.field.user.user.user_picture
|
- field.field.user.user.user_picture
|
||||||
- image.style.thumbnail
|
- image.style.thumbnail
|
||||||
module:
|
module:
|
||||||
|
- file
|
||||||
- image
|
- image
|
||||||
|
- text
|
||||||
- user
|
- user
|
||||||
_core:
|
_core:
|
||||||
default_config_hash: '-spcniWjm5Ez6YM3ccxk3ocvsn52jkdaGEgp0xzPYU8'
|
default_config_hash: '-spcniWjm5Ez6YM3ccxk3ocvsn52jkdaGEgp0xzPYU8'
|
||||||
|
@ -15,6 +19,21 @@ targetEntityType: user
|
||||||
bundle: user
|
bundle: user
|
||||||
mode: default
|
mode: default
|
||||||
content:
|
content:
|
||||||
|
field_bio:
|
||||||
|
weight: 2
|
||||||
|
label: above
|
||||||
|
settings: { }
|
||||||
|
third_party_settings: { }
|
||||||
|
type: text_default
|
||||||
|
region: content
|
||||||
|
field_gpg_public_key:
|
||||||
|
weight: 1
|
||||||
|
label: above
|
||||||
|
settings:
|
||||||
|
use_description_as_link_text: true
|
||||||
|
third_party_settings: { }
|
||||||
|
type: file_default
|
||||||
|
region: content
|
||||||
user_picture:
|
user_picture:
|
||||||
type: image
|
type: image
|
||||||
weight: 0
|
weight: 0
|
||||||
|
|
22
config/sync/field.field.user.user.field_bio.yml
Normal file
22
config/sync/field.field.user.user.field_bio.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
uuid: dc19403f-a0a1-47e9-9a98-292f5cc2683f
|
||||||
|
langcode: en
|
||||||
|
status: true
|
||||||
|
dependencies:
|
||||||
|
config:
|
||||||
|
- field.storage.user.field_bio
|
||||||
|
module:
|
||||||
|
- text
|
||||||
|
- user
|
||||||
|
id: user.user.field_bio
|
||||||
|
field_name: field_bio
|
||||||
|
entity_type: user
|
||||||
|
bundle: user
|
||||||
|
label: Bio
|
||||||
|
description: ''
|
||||||
|
required: false
|
||||||
|
translatable: false
|
||||||
|
default_value: { }
|
||||||
|
default_value_callback: ''
|
||||||
|
settings:
|
||||||
|
display_summary: false
|
||||||
|
field_type: text_with_summary
|
27
config/sync/field.field.user.user.field_gpg_public_key.yml
Normal file
27
config/sync/field.field.user.user.field_gpg_public_key.yml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
uuid: f3bac6b8-03b8-4b50-813d-74a0aebdb7ef
|
||||||
|
langcode: en
|
||||||
|
status: true
|
||||||
|
dependencies:
|
||||||
|
config:
|
||||||
|
- field.storage.user.field_gpg_public_key
|
||||||
|
module:
|
||||||
|
- file
|
||||||
|
- user
|
||||||
|
id: user.user.field_gpg_public_key
|
||||||
|
field_name: field_gpg_public_key
|
||||||
|
entity_type: user
|
||||||
|
bundle: user
|
||||||
|
label: 'GPG public key'
|
||||||
|
description: ''
|
||||||
|
required: false
|
||||||
|
translatable: false
|
||||||
|
default_value: { }
|
||||||
|
default_value_callback: ''
|
||||||
|
settings:
|
||||||
|
file_directory: ''
|
||||||
|
file_extensions: asc
|
||||||
|
max_filesize: ''
|
||||||
|
description_field: false
|
||||||
|
handler: 'default:file'
|
||||||
|
handler_settings: { }
|
||||||
|
field_type: file
|
19
config/sync/field.storage.user.field_bio.yml
Normal file
19
config/sync/field.storage.user.field_bio.yml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
uuid: 86ae8bc8-2606-42f0-9cda-da3f6bf63306
|
||||||
|
langcode: en
|
||||||
|
status: true
|
||||||
|
dependencies:
|
||||||
|
module:
|
||||||
|
- text
|
||||||
|
- user
|
||||||
|
id: user.field_bio
|
||||||
|
field_name: field_bio
|
||||||
|
entity_type: user
|
||||||
|
type: text_with_summary
|
||||||
|
settings: { }
|
||||||
|
module: text
|
||||||
|
locked: false
|
||||||
|
cardinality: 1
|
||||||
|
translatable: true
|
||||||
|
indexes: { }
|
||||||
|
persist_with_no_fields: false
|
||||||
|
custom_storage: false
|
23
config/sync/field.storage.user.field_gpg_public_key.yml
Normal file
23
config/sync/field.storage.user.field_gpg_public_key.yml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
uuid: ef210af7-b091-46d9-a882-2b15fd240ca1
|
||||||
|
langcode: en
|
||||||
|
status: true
|
||||||
|
dependencies:
|
||||||
|
module:
|
||||||
|
- file
|
||||||
|
- user
|
||||||
|
id: user.field_gpg_public_key
|
||||||
|
field_name: field_gpg_public_key
|
||||||
|
entity_type: user
|
||||||
|
type: file
|
||||||
|
settings:
|
||||||
|
display_field: false
|
||||||
|
display_default: false
|
||||||
|
uri_scheme: public
|
||||||
|
target_type: file
|
||||||
|
module: file
|
||||||
|
locked: false
|
||||||
|
cardinality: 1
|
||||||
|
translatable: true
|
||||||
|
indexes: { }
|
||||||
|
persist_with_no_fields: false
|
||||||
|
custom_storage: false
|
|
@ -7,18 +7,18 @@ source:
|
||||||
process:
|
process:
|
||||||
filename: filename
|
filename: filename
|
||||||
source_full_path:
|
source_full_path:
|
||||||
-
|
-
|
||||||
plugin: concat
|
plugin: concat
|
||||||
delimiter: /
|
delimiter: /
|
||||||
source:
|
source:
|
||||||
- filepath
|
- filepath
|
||||||
-
|
-
|
||||||
plugin: str_replace
|
plugin: str_replace
|
||||||
search: 'sites/default/files/'
|
search: 'sites/default/files/'
|
||||||
# The old files must be located at this path:
|
# The old files must be located at this path:
|
||||||
replace: 'sites/default/import/'
|
replace: 'sites/default/import/'
|
||||||
-
|
-
|
||||||
plugin: urlencode
|
plugin: urlencode
|
||||||
uri:
|
uri:
|
||||||
plugin: file_copy
|
plugin: file_copy
|
||||||
source:
|
source:
|
||||||
|
@ -29,17 +29,17 @@ process:
|
||||||
created: timestamp
|
created: timestamp
|
||||||
changed: timestamp
|
changed: timestamp
|
||||||
uid:
|
uid:
|
||||||
-
|
-
|
||||||
plugin: migration_lookup
|
plugin: migration_lookup
|
||||||
migration: agaric_user
|
migration: agaric_user
|
||||||
source: uid
|
source: uid
|
||||||
no_stub: true
|
no_stub: true
|
||||||
-
|
-
|
||||||
# If the user id does not exists then migrate it as anonymous.
|
# If the user id does not exists then migrate it as anonymous.
|
||||||
plugin: default_value
|
plugin: default_value
|
||||||
default_value: 0
|
default_value: 0
|
||||||
destination:
|
destination:
|
||||||
plugin: entity:file
|
plugin: entity:file
|
||||||
migration_dependencies:
|
migration_dependencies:
|
||||||
required:
|
required:
|
||||||
- nichq_community_user
|
- agaric_user
|
||||||
|
|
|
@ -16,14 +16,14 @@ process:
|
||||||
default_value: "und"
|
default_value: "und"
|
||||||
title: title
|
title: title
|
||||||
uid:
|
uid:
|
||||||
-
|
-
|
||||||
plugin: migration_lookup
|
plugin: migration_lookup
|
||||||
migration: agaric_user
|
migration: agaric_user
|
||||||
source: node_uid
|
source: node_uid
|
||||||
no_stub: true
|
no_stub: true
|
||||||
-
|
-
|
||||||
plugin: skip_on_empty
|
plugin: skip_on_empty
|
||||||
method: row
|
method: row
|
||||||
paragraph_body:
|
paragraph_body:
|
||||||
plugin: migration
|
plugin: migration
|
||||||
migration: agaric_page_paragraph
|
migration: agaric_page_paragraph
|
||||||
|
@ -31,7 +31,7 @@ process:
|
||||||
field_body_paragraph:
|
field_body_paragraph:
|
||||||
plugin: iterator
|
plugin: iterator
|
||||||
source:
|
source:
|
||||||
- '@paragraph_body'
|
- '@paragraph_body'
|
||||||
process:
|
process:
|
||||||
target_id: '0'
|
target_id: '0'
|
||||||
target_revision_id: '1'
|
target_revision_id: '1'
|
||||||
|
@ -45,5 +45,5 @@ process:
|
||||||
revision_timestamp: timestamp
|
revision_timestamp: timestamp
|
||||||
migration_dependencies:
|
migration_dependencies:
|
||||||
required:
|
required:
|
||||||
- agaric_user
|
- agaric_user
|
||||||
- agaric_page_paragraph
|
- agaric_page_paragraph
|
||||||
|
|
|
@ -15,6 +15,7 @@ process:
|
||||||
status: status
|
status: status
|
||||||
timezone: timezone
|
timezone: timezone
|
||||||
init: init
|
init: init
|
||||||
|
field_bio: field_bio
|
||||||
roles:
|
roles:
|
||||||
-
|
-
|
||||||
plugin: static_map
|
plugin: static_map
|
||||||
|
@ -30,3 +31,29 @@ process:
|
||||||
plugin: role_generate
|
plugin: role_generate
|
||||||
entity_type: user_role
|
entity_type: user_role
|
||||||
value_key: id
|
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue