user.schema.yml

Same filename and directory in other branches
  1. 10 core/modules/user/config/schema/user.schema.yml
  2. 9 core/modules/user/config/schema/user.schema.yml
  3. 8.9.x 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. constraints:
  106. FullyValidatable: ~
  107. mapping:
  108. uid_only:
  109. type: boolean
  110. label: 'UID only identifier'
  111. ip_limit:
  112. type: integer
  113. label: 'IP limit'
  114. constraints:
  115. PositiveOrZero: ~
  116. ip_window:
  117. type: integer
  118. label: 'IP window'
  119. constraints:
  120. PositiveOrZero: ~
  121. user_limit:
  122. type: integer
  123. label: 'User limit'
  124. constraints:
  125. PositiveOrZero: ~
  126. user_window:
  127. type: integer
  128. label: 'User window'
  129. constraints:
  130. PositiveOrZero: ~
  131. user.role.*:
  132. type: config_entity
  133. label: 'User role settings'
  134. constraints:
  135. FullyValidatable: ~
  136. mapping:
  137. id:
  138. type: machine_name
  139. label: 'ID'
  140. label:
  141. type: required_label
  142. label: 'Label'
  143. weight:
  144. type: weight
  145. label: 'User role weight'
  146. is_admin:
  147. type: boolean
  148. label: 'User is admin'
  149. permissions:
  150. type: sequence
  151. label: 'Permissions'
  152. orderby: value
  153. sequence:
  154. type: string
  155. label: 'Permission'
  156. constraints:
  157. Callback:
  158. callback: [\Drupal\user\Entity\Role, getAllValidPermissions]
  159. action.configuration.user_add_role_action:
  160. type: mapping
  161. label: 'Configuration for the add role action'
  162. constraints:
  163. FullyValidatable: ~
  164. mapping:
  165. rid:
  166. type: string
  167. label: 'The ID of the role to add'
  168. constraints:
  169. RoleExists: ~
  170. action.configuration.user_block_user_action:
  171. type: action_configuration_default
  172. label: 'Block the selected users configuration'
  173. action.configuration.user_cancel_user_action:
  174. type: action_configuration_default
  175. label: 'Cancel the selected user accounts configuration'
  176. action.configuration.user_remove_role_action:
  177. type: mapping
  178. label: 'Configuration for the remove role action'
  179. constraints:
  180. FullyValidatable: ~
  181. mapping:
  182. rid:
  183. type: string
  184. label: 'The ID of the role to remove'
  185. constraints:
  186. RoleExists: ~
  187. action.configuration.user_unblock_user_action:
  188. type: action_configuration_default
  189. label: 'Unblock the selected users configuration'
  190. search.plugin.user_search:
  191. type: sequence
  192. label: 'User search'
  193. condition.plugin.user_role:
  194. type: condition.plugin
  195. mapping:
  196. roles:
  197. type: sequence
  198. sequence:
  199. type: string
  200. # Schema for the entity reference 'default:user' selection handler settings.
  201. entity_reference_selection.default:user:
  202. type: entity_reference_selection.default
  203. label: 'User selection handler settings'
  204. mapping:
  205. filter:
  206. type: mapping
  207. label: 'Filter settings'
  208. mapping:
  209. type:
  210. type: string
  211. label: 'Filter by'
  212. role:
  213. type: sequence
  214. label: 'Restrict to the selected roles'
  215. sequence:
  216. type: string
  217. label: 'Role'
  218. include_anonymous:
  219. type: boolean
  220. label: 'Include the anonymous user in the matched entities.'
  221. field.formatter.settings.user_name:
  222. type: mapping
  223. mapping:
  224. link_to_entity:
  225. type: boolean
  226. label: 'Link to the user'

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