public function limitQueryToCreator(QueryBuilder $q)
    {
        $q->join('t', MAUTIC_TABLE_PREFIX.'contactclient', 'm', 'e.id = t.contactclient_id')
            ->andWhere('m.created_by = :userId')
            ->setParameter('userId', $this->userHelper->getUser()->getId());
    }
public function limitQueryToCreator(QueryBuilder $q)
    {
        $q->join('t', MAUTIC_TABLE_PREFIX.'contactclient', 'm', 'e.id = t.contactclient_id')
            ->andWhere('m.created_by = :userId')
            ->setParameter('userId', $this->userHelper->getUser()->getId());
    }
public function limitQueryToCreator ( QueryBuilder $ q ) { $ q -> join ( 't' , MAUTIC_TABLE_PREFIX . 'contactclient' , 'm' , 'e.id = t.contactclient_id' ) -> andWhere ( 'm.created_by = :userId' ) -> setParameter ( 'userId' , $ this -> userHelper -> getUser ( ) -> getId ( ) ) ; }
Joins the email table and limits created_by to currently logged in user.

@param QueryBuilder $q
Joins the email table and limits created_by to currently logged in user .