Reputation: 4083
I am using FOSUserBundle, SonataUserBundle. Here is my code,
https://github.com/vishalmelmatti/FOSSonataUserFacebookIntegration
I have 3 options to access users table,
1) Create UsersRepository in https://github.com/vishalmelmatti/FOSSonataUserFacebookIntegration/tree/master/src/Application/Sonata/UserBundle/Entity
2) Extend FOSUserBundle's FOS\UserBundle\Doctrine\UserManager and add my methods to it.
3) Extend FOS\UserBundle\Security\UserProvider and add my methods to it which intenally access class created in 2.
What would be the best approach ?
Upvotes: 0
Views: 126
Reputation: 1333
The repository approach sounds to be the best for me, as it's entity related / specific logic on "database" operations, and repositories ARE the way to do it right.
It's quite well explained in the docs
Upvotes: 0