6

I installed FOSUserBundle and i would like to add any additional role, such ROLE_NEW. In sfGuardUser just had to do

$this->getUser()->addCredential('new');

in action, and here?

Besides, how can I (admin) manage all (first of all manage ROLES) users? In sfGuardUser I had generated default admin page, and here?

j0k
  • 22,600
  • 28
  • 79
  • 90
Tony Evyght
  • 2,385
  • 6
  • 20
  • 19

1 Answers1

7

By default FOSUserBundle manage roles as array, but you can use the concept of "Groups" for this purpose.

Read in docs https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/groups.md

And read some discussions about advantages and disadvantages FOS bundle - How to select users with a specific role?

Community
  • 1
  • 1
smoreno
  • 3,129
  • 3
  • 32
  • 49