id: d7_user_settings
label: User configuration
migration_tags:
  - Drupal 7
  - Configuration
source:
  plugin: variable
  variables:
    - user_mail_status_blocked_notify
    - user_mail_status_activated_notify
    - user_email_verification
    - user_register
    - anonymous
  source_module: user
process:
  'notify/status_blocked': user_mail_status_blocked_notify
  'notify/status_activated': user_mail_status_activated_notify
  verify_mail: user_email_verification
  # @see core/modules/user/config/install/user.settings.yml
  # Default values
  cancel_method:
    plugin: default_value
    default_value: user_cancel_block
  password_reset_timeout:
    plugin: default_value
    default_value: 86400
  password_strength:
    plugin: default_value
    default_value: true
  'notify/cancel_confirm':
    plugin: default_value
    default_value: true
  'notify/password_reset':
    plugin: default_value
    default_value: true
  'notify/status_canceled':
    plugin: default_value
    default_value: false
  'notify/register_admin_created':
    plugin: default_value
    default_value: true
  'notify/register_no_approval_required':
    plugin: default_value
    default_value: true
  'notify/register_pending_approval':
    plugin: default_value
    default_value: true
  register:
    plugin: static_map
    source: user_register
    default_value: visitors_admin_approval
    map:
      2: visitors_admin_approval
      1: visitors
      0: admin_only
  anonymous: anonymous
destination:
  plugin: config
  config_name: user.settings
