rafbanaan
rafbanaan

Reputation: 631

Only using specific methodes of FOSUserBundle

I'm building a website with symfony and for the user management I choose FOSUserBundle. Now.. I've build my form where I need an username, email and password (nothing more for now), which are the fields in my User table. But with FOSUserBundle it expects a lot more fields in my table like username_canonical, token, login_confirmation....

Is there a way to still use FOSUserBundle, but only with the 3 fields that I want to use? I was searching to maybe override it, but I couldn't find a solution.

Upvotes: 0

Views: 39

Answers (1)

Nils Rückmann
Nils Rückmann

Reputation: 603

In order to use FOS\UserBundle your user class needs to implement FOS\UserBundle\Model\UserInterface. It will provide the mandatory information. If you really want to have a simpler user interface (although FOS\UserBundle\Model\UserInterface is pretty simple) you will need to create your own logic (e.g. fork FOS\UserBundle).

Upvotes: 2

Related Questions