How to definitely disable registration in FOSUserBundle

后端 未结 7 2437
无人及你
无人及你 2021-02-19 03:02

In my project, I allow only one user to manage the content of the website. This user will be added using the command line at first.

Now, I want to get the registration a

7条回答
  •  抹茶落季
    2021-02-19 03:33

    Take a look at the routing configuration imported from

    vendor/friendsofsymfony/user-bundle/Resources/config/routing/all.xml

    If you want just the basic security actions, just import

    @FOSUserBundle/Resources/config/routing/security.xml

    instead of

    @FOSUserBundle/Resources/config/routing/all.xml

    This way you can simply select which components (security, profile, resetting, change_password) you want to use or event import only specific routes from those components.

提交回复
热议问题