user.schema.yml

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

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