public function getOrganizationRole($user, $organization)
    {
        return $this->dm->getRepository('WobbleCodeUserBundle:Role')->findOneBy(
            [
                'organization.$id' => new \MongoId($organization->getId()),
                'user.$id' => new \MongoId($user->getId())
            ]
        );
    }
public function getOrganizationRole($user, $organization)
    {
        return $this->dm->getRepository('WobbleCodeUserBundle:Role')->findOneBy(
            [
                'organization.$id' => new \MongoId($organization->getId()),
                'user.$id' => new \MongoId($user->getId())
            ]
        );
    }
public function getOrganizationRole ( $ user , $ organization ) { return $ this -> dm -> getRepository ( 'WobbleCodeUserBundle:Role' ) -> findOneBy ( [ 'organization.$id' => new \ MongoId ( $ organization -> getId ( ) ) , 'user.$id' => new \ MongoId ( $ user -> getId ( ) ) ] ) ; }
Get user role definition within an organization

@param User         $user
@param OrganizationInterface $organizatgion

@return (Role|false)
Get user role definition within an organization