I'm absolutely new to Symfony2 but already in love with this framework.
I'm having a project that requires to have 3 different user types.
One will be super admin, other two will be a regular users but with different profile layouts. Different layouts for profile means registration form for those two user types must have different form fields and different layouts in the application after registration.
I think I've got the idea (don't know if that will be OK later) how to manage users after registration. But for now I don't understand how to build two different registration forms that will be extended from FOSUserBundle.
As far as I understand FOSUB have only one point in the configuration where registration is set up and cannot have multiple "registration:"
In the config.yml I have:
fos_user:
db_driver: orm
firewall_name: main
user_class: Company\UserBundle\Entity\User
registration:
confirmation: { enabled: true }
security.yml:
security:
encoders:
FOS\UserBundle\Model\UserInterface: sha512
main:
pattern: ^/
form_login:
provider: fos_userbundle
csrf_provider: form.csrf_provider
logout: true
anonymous: true
My idea is to create three different bundles that extends FOSUB, but documentation says that only one bundle can declare FOSUB as parent.
Another option (from documentation) is to extend ContainerAware implementing all original methods. But even in this case, I don't get it how I have to configure app/config/{config|security|routing}.yml to have for instance /register_employee, /register_manager links that will use FOSUB and my custom forms?
Please point me to right direction. Thanks.