mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Restrict new user registration via hook_install() instead of config/install.
This commit is contained in:
parent
434b473e14
commit
345464c6ad
2 changed files with 3 additions and 16 deletions
|
@ -1,16 +0,0 @@
|
|||
anonymous: Anonymous
|
||||
verify_mail: true
|
||||
notify:
|
||||
cancel_confirm: true
|
||||
password_reset: true
|
||||
status_activated: true
|
||||
status_blocked: false
|
||||
status_canceled: false
|
||||
register_admin_created: true
|
||||
register_no_approval_required: true
|
||||
register_pending_approval: true
|
||||
register: admin_only
|
||||
cancel_method: user_cancel_block
|
||||
password_reset_timeout: 86400
|
||||
password_strength: true
|
||||
langcode: en
|
|
@ -14,6 +14,9 @@ function farm_install() {
|
|||
|
||||
// Use private file system by default.
|
||||
\Drupal::configFactory()->getEditable('system.file')->set('default_scheme', 'private')->save();
|
||||
|
||||
// Only allow admins to register new users.
|
||||
\Drupal::configFactory()->getEditable('user.settings')->set('register', 'admin_only')->save();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue