user.schema.yml

Same filename in other branches
  1. 9 core/modules/user/config/schema/user.schema.yml
  2. 8.9.x core/modules/user/config/schema/user.schema.yml
  3. 10 core/modules/user/config/schema/user.schema.yml
core/modules/user/config/schema/user.schema.yml

File

core/modules/user/config/schema/user.schema.yml

View source
  1. # Schema for the configuration files of the User module.
  2. user.settings:
  3. type: config_object
  4. label: 'User settings'
  5. constraints:
  6. FullyValidatable: ~
  7. mapping:
  8. anonymous:
  9. type: required_label
  10. label: 'Name'
  11. verify_mail:
  12. type: boolean
  13. label: 'Require email verification when a visitor creates an account'
  14. notify:
  15. type: mapping
  16. label: 'Notify user'
  17. mapping:
  18. cancel_confirm:
  19. type: boolean
  20. label: 'Account cancellation confirmation'
  21. password_reset:
  22. type: boolean
  23. label: 'Notify user when password reset'
  24. status_activated:
  25. type: boolean
  26. label: 'Notify user when account is activated'
  27. status_blocked:
  28. type: boolean
  29. label: 'Account blocked'
  30. status_canceled:
  31. type: boolean
  32. label: 'Account canceled'
  33. register_admin_created:
  34. type: boolean
  35. label: 'Welcome (new user created by administrator)'
  36. register_no_approval_required:
  37. type: boolean
  38. label: 'Welcome (no approval required)'
  39. register_pending_approval:
  40. type: boolean
  41. label: 'Welcome (awaiting approval)'
  42. register:
  43. type: string
  44. label: 'Who can register accounts?'
  45. # Choices are derived from the constants.
  46. # @see \Drupal\user\UserInterface::REGISTER_*
  47. # @todo Convert to use Enum in https://www.drupal.org/project/drupal/issues/3450782
  48. constraints:
  49. Choice:
  50. choices:
  51. - 'visitors'
  52. - 'admin_only'
  53. - 'visitors_admin_approval'
  54. cancel_method:
  55. type: string
  56. label: 'When cancelling a user account'
  57. constraints:
  58. UserCancelMethod: []
  59. password_reset_timeout:
  60. type: integer
  61. label: 'Password reset timeout'
  62. # @todo Increase min in https://www.drupal.org/i/3441772
  63. constraints:
  64. Range:
  65. min: 1
  66. password_strength:
  67. type: boolean
  68. label: 'Enable password strength indicator'
  69. user.mail:
  70. type: config_object
  71. label: 'Email settings'
  72. constraints:
  73. FullyValidatable: ~
  74. mapping:
  75. cancel_confirm:
  76. type: mail
  77. label: 'Account cancellation confirmation'
  78. password_reset:
  79. type: mail
  80. label: 'Password recovery'
  81. register_admin_created:
  82. type: mail
  83. label: 'Account created by administrator'
  84. register_no_approval_required:
  85. type: mail
  86. label: 'Registration confirmation (No approval required)'
  87. register_pending_approval:
  88. type: mail
  89. label: 'Registration confirmation (Pending approval)'
  90. register_pending_approval_admin:
  91. type: mail
  92. label: 'Admin (user awaiting approval)'
  93. status_activated:
  94. type: mail
  95. label: 'Account activation'
  96. status_blocked:
  97. type: mail
  98. label: 'Account blocked'
  99. status_canceled:
  100. type: mail
  101. label: 'Account cancelled'
  102. user.flood:
  103. type: config_object
  104. label: 'User flood settings'
  105. mapping:
  106. uid_only:
  107. type: boolean
  108. label: 'UID only identifier'
  109. ip_limit:
  110. type: integer
  111. label: 'IP limit'
  112. ip_window:
  113. type: integer
  114. label: 'IP window'
  115. user_limit:
  116. type: integer
  117. label: 'User limit'
  118. user_window:
  119. type: integer
  120. label: 'User window'
  121. user.role.*:
  122. type: config_entity
  123. label: 'User role settings'
  124. constraints:
  125. FullyValidatable: ~
  126. mapping:
  127. id:
  128. type: machine_name
  129. label: 'ID'
  130. label:
  131. type: required_label
  132. label: 'Label'
  133. weight:
  134. type: weight
  135. label: 'User role weight'
  136. is_admin:
  137. type: boolean
  138. label: 'User is admin'
  139. permissions:
  140. type: sequence
  141. label: 'Permissions'
  142. orderby: value
  143. sequence:
  144. type: string
  145. label: 'Permission'
  146. constraints:
  147. Callback:
  148. callback: [\Drupal\user\Entity\Role, getAllValidPermissions]
  149. action.configuration.user_add_role_action:
  150. type: mapping
  151. label: 'Configuration for the add role action'
  152. mapping:
  153. rid:
  154. type: string
  155. label: 'The ID of the role to add'
  156. action.configuration.user_block_user_action:
  157. type: action_configuration_default
  158. label: 'Block the selected users configuration'
  159. action.configuration.user_cancel_user_action:
  160. type: action_configuration_default
  161. label: 'Cancel the selected user accounts configuration'
  162. action.configuration.user_remove_role_action:
  163. type: mapping
  164. label: 'Configuration for the remove role action'
  165. mapping:
  166. rid:
  167. type: string
  168. label: 'The ID of the role to remove'
  169. action.configuration.user_unblock_user_action:
  170. type: action_configuration_default
  171. label: 'Unblock the selected users configuration'
  172. search.plugin.user_search:
  173. type: sequence
  174. label: 'User search'
  175. condition.plugin.user_role:
  176. type: condition.plugin
  177. mapping:
  178. roles:
  179. type: sequence
  180. sequence:
  181. type: string
  182. # Schema for the entity reference 'default:user' selection handler settings.
  183. entity_reference_selection.default:user:
  184. type: entity_reference_selection.default
  185. label: 'User selection handler settings'
  186. mapping:
  187. filter:
  188. type: mapping
  189. label: 'Filter settings'
  190. mapping:
  191. type:
  192. type: string
  193. label: 'Filter by'
  194. role:
  195. type: sequence
  196. label: 'Restrict to the selected roles'
  197. sequence:
  198. type: string
  199. label: 'Role'
  200. include_anonymous:
  201. type: boolean
  202. label: 'Include the anonymous user in the matched entities.'
  203. field.formatter.settings.user_name:
  204. type: mapping
  205. mapping:
  206. link_to_entity:
  207. type: boolean
  208. label: 'Link to the user'

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.