PUGX / PUGXMultiUserBundle

An extension for FOSUserBundle to handle users of different types. Compatible with Doctrine ORM.
163 stars 96 forks source link

FindUsers by type #73

Open walemos opened 9 years ago

walemos commented 9 years ago

How access the variable type created in this bundle?

/**

glukose commented 9 years ago

I asked myself the same question no so long ago. I couldn't. So I used that code :

$discriminator = $this->container->get('pugx_user.manager.user_discriminator');
if($discriminator->getClass() == 'UserBundle\Entity\Utilisateur'){
} else { ... }