Get current user type PUGXMultiUserBundle

Thursday, July 3, 2014

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.







http://ift.tt/1khDSZu