title: How to disable registration in FosUserbundle selectively?
body: <p>How can I disable registration in FosUserBundle selectively? I want to know how can I disable and enable the registration in FosUserbundle. I was searching information and I found this post: <a href="https://codereviewvideos.com/course/getting-started-with-fosuserbundle/video/how-to-disable-registation-in-fosuserbundle" rel="nofollow noreferrer">https://codereviewvideos.com/course/getting-started-with-fosuserbundle/video/how-to-disable-registation-in-fosuserbundle</a></p>
  
  <p>I will extract the important information from there:</p>
  
  <pre><code>It may be that you wish to enabled and disable registration selectively.
  
  In this instance, and for the improvement of site administrator user experience, we can use a simple parameter value to allow the site registration to be toggled between and enabled and disabled state.
  
  To achieve this, all we need to do is add in a new parameter in to parameters.yml:
  
  # app/config/parameters.yml
  parameters:
      registration_enabled: true
  </code></pre>
  
  <p>I tried that info, but it didn't work and I don't know if I am forgetting something. I also know that there are other solutions like touching the registration controller or configuring an event listener, but if it is possible use a cleaner solution (like the above changing a parameter, I'd rather it) </p>