bolt / users

Bolt users extension.
MIT License
8 stars 7 forks source link

Add Config option to disable registration #13

Open enthus1ast opened 3 years ago

enthus1ast commented 3 years ago

Currently the registration cannot be disabled (it seems). Please add an option to the config that this can be disabled.

I-Valchev commented 3 years ago

What do you mean disable the registration?

If it's about the /register endpoint, you should be able to override the route in routes.yaml and then it won't be reachable.

enthus1ast commented 3 years ago

yes its about the register endpoint. I still think it would be good to just disable this in the plugins config. Since it its a plugin feature, that must be disabled in the global routes config.

I've added this to my routes.yml:

# ------------------------------------------------------------------------------
# Place your own routes here, that have a HIGHER priority than the default routes.

# Disable the registration added by bolt/users
foo:
  path: /register
  methods: []
  defaults:
    _controller: Bolt\Controller\Frontend\DetailController::renderTemplate
    template: 404.twig

# ------------------------------------------------------------------------------