I am familiarizing myself with Symfony 2, after using Symfony 1.x for a few years.
I need to create a membership website that has a custom registration process. Additionally, the website dynamically generates user roles (formerly credentials
in SF v1.x) to use to restrict access to portions of the site.
I have had a look at the FOSUserBundle and I can't see what it is offering over and above the code that is available on the 'How to load users from a database' link in the cookbook. I have a lot of custom logic involved in my user registration and user management, as I mentioned earlier, and I don't want to undergo a learning curve of using FOSUserBundle only to have to override a lot of the methods etc, with my own custom methods.
I don't know enough about Symfony2 to make the decision as to whether to learn from the cookbook code and extend it in my own UserBundle, or invest time learning how to use the FOSUserBundle and customize it with my custom logic.
In summary this is what I want to do with users:
My question then is - which course requires the minimum learning curve and effort for me (I have less than a week to get a barebones site up and running - and I'm only doing web development in my spare time).
Do I:
It's an old subject but still very interesting nowadays. I disagree with Florent's answer, because i think it doesn't provide an objective view.
FOSUserBundle provides User and Group implementations, just as Symfony already provide, that you just need to configure. The cookbook and the official doc will allow you to get that working in less than a day.
The "full of features" controllers are interesting... as long as you stay in the way defined by this bundle. Don't be too original or you'll spend days overriding code and config of the bundle. Honestly, registration and lost password are easy to implements, and SF2 form's mechanism already make it easy to handle errors.
Views are minimalistic and uninteresting out of the box in FOSUserBundle, make your own ones.
If i had to compare both learning curves i would just sum it up like this : both take the same time to achieve a complex user management system, but you'll be much more in control of your code when writing your own provider.
Would be interesting, 2 years later, to know what choice you made and how it went, Homunculus Reticulli.
FOSUserBundle
provides:
User
and Group
implementationsIf you need these features, use this bundle, it will save your time!
I don't know how complex is your authentication logic but I'm pretty sure that it can fit with FOSUserBundle
's one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With