Show user based on subdomain
Reply to my self:

I have created a custom Controller that get the user from db based on the domain, i get the subdomain using this:

$subdomain = substr_count($_SERVER['HTTP_HOST'], '.') &gt; 1 ? substr($_SERVER['HTTP_HOST'], 0, strpos($_SERVER['HTTP_HOST'], '.')) : '';


Not sure if its the best.

Then i compare to the user on db:

$result = \Drupal::database()-&gt;select('user_data', 'n')
            -&gt;fields('n', array('id', 'user_domain', 'user_email'))
            -&gt;condition('n.user_domain', $subdomain)
            -&gt;execute()-&gt;fetchAllAssoc('id');


First you need to create a install schema with the domain created so you can fetch this.

Then loading by user email:

$user = user_load_by_mail($userEmail); 


and pass the variable to the Twig.
Not sure if its the best way.