title: Sentry Symfony How to capture user
body: <p>I'm using sentry on my symfony project and I want to identify the Users who have the error. So I checked the sentry documentation I found out that -&gt; <a href="https://docs.sentry.io/platforms/php/guides/symfony/enriching-events/identify-user/" rel="nofollow noreferrer">https://docs.sentry.io/platforms/php/guides/symfony/enriching-events/identify-user/</a></p>
  <pre class="lang-php prettyprint-override"><code>\Sentry\configureScope(function (\Sentry\State\Scope $scope): void {
    $scope-&gt;setUser(['email' =&gt; 'jane.doe@example.com']);
  });
  </code></pre>
  <p>But I don't where to put this function, and the documentation doesn't give information about that.
  I tried to put in my index.php file and it's works but I don't how I can get the information of the current user.</p>