Answer the question
In order to leave comments, you need to log in
Is it possible to include FOSUserBundle in the middle stage of development?
Good evening.
Learning symfony by making a website for myself.
It seems to me that the wrong side approach has begun.
So far, I've implemented a blogging system for users, news, personal messages, and little things (widgets, etc.).
Earlier, to my deep regret, I overlooked ready-made bundles.
Is it possible to connect the FOSUserBundle bundle at this stage?
I understand that the user table that is currently available is very different from the one generated by FOSUserBundle, except for the matches in the main fields (username, email, password).
There is also an understanding that the implementation of authentication (authorization) is completely different from the one that I wrote.
Mb. Do you have any tips or articles?
Or write everything from scratch?
Answer the question
In order to leave comments, you need to log in
Yes, but ask yourself why? If you need at least 90% of the FosUserBundle functionality, then maybe it makes sense.
In any case - the database difference can be resolved by migrations (DoctrineMigrationBundle).
I understand that the user table that is currently available is very different from the one generated by FOSUserBundle, except for the matches in the main fields (username, email, password).
The FOS user bundle has its own user entity, located in the vendor.
When connecting fos and needing your own fields for the user, you need to create a new bundle to override FOSBundle, and expand the user entity from the fos user.
Those. your user with the fields to lay down over the user of a background and fos works with your entity user using the fields.
So there is no connection problem. Your functionality does not need to be changed in any way, except for the authorization mechanism, which you give at the mercy of FOS
Read more heresymfony.in.ua/symfony2-fosuser-documentation-conte...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question