0

I'm using PUGXMultiUserBundle and FOSUserBundle with symfony2.

My problem is i want to know the current user type in my controller,

$user = $this->container->get('security.context')->getToken()->getUser();
// now i want to know the user's type for example
if( $user->getType() == "xx") {
 ...... }    

of course the attribute type don't exist it's created by the PUGXMultiUserBundle in the datebase.

Ramy Rais
  • 140
  • 2
  • 10

0 Answers0