title: Get logged user email in entity for querybuilder - Symfony
body: <p>How I can get the logged user email in entity for query builder to select items which has been created by current user?</p>
  
  <p>My entity field:</p>
  
  <pre><code>-&gt;add('rfqitem', 'entity', array(
      'label'         =&gt; 'RFQ Items',
      'class'         =&gt; 'RFQ\IronilBundle\Entity\RFQItem',
      'multiple'      =&gt; true,
      'expanded'      =&gt; false,
      'attr'          =&gt; array(
          'class'         =&gt; 'rfq-item-choser'),
      'query_builder' =&gt; function ($eer){
          return $eer
              -&gt;createQueryBuilder('a')
              -&gt;where('a.user_email = :email')
              -&gt;setParameter('email', 'LOGGED USER EMAIL');},
  ))
  </code></pre>
  
  <p>Create form method:</p>
  
  <pre><code>$user = $this-&gt;get('security.context')-&gt;getToken();
  $form = $this-&gt;createForm(new RFQType(), $user, $entity, array(
     'action' =&gt; $this-&gt;generateUrl('rfq_create'),
     'method' =&gt; 'POST',
     'user' =&gt; $this-&gt;getUser()
  ));
  </code></pre>