title: keystone.js Currently logged in user
body: <p>I'm new to Keystone, but have been trying all day to find the currently logged in user name but I'm not clear how to do this.</p>
  
  <p>If I take the index view from keystone for example</p>
  
  <pre><code>{{!&lt; default}}
  &lt;div class="container"&gt;
      &lt;div class="jumbotron"&gt;&lt;img src="/images/logo.svg" width="160"&gt;
          &lt;h1&gt;Welcome&lt;/h1&gt;
          &lt;p&gt;This is your new &lt;a href='http://keystonejs.com' target='_blank'&gt;KeystoneJS&lt;/a&gt; website.&lt;/p&gt;
          &lt;p&gt;
              It includes the latest versions of
              &lt;a href='http://getbootstrap.com/' target='_blank'&gt;Bootstrap&lt;/a&gt;
              and &lt;a href='http://www.jquery.com/' target='_blank'&gt;jQuery&lt;/a&gt;.
          &lt;/p&gt;
          &lt;p&gt;Visit the &lt;a href='http://keystonejs.com/guide' target='_blank'&gt;Getting Started&lt;/a&gt; guide to learn how to customise it.&lt;/p&gt;
          &lt;hr&gt;
          &lt;p&gt;We have created a default Admin user for you with the email &lt;strong&gt;masterofimps@yahoo.co.uk&lt;/strong&gt; and the password &lt;strong&gt;admin&lt;/strong&gt;.&lt;/p&gt;
          &lt;p&gt;&lt;a href="/keystone/signin" style="margin-right: 10px" class="btn btn-lg btn-primary"&gt;Sign in&lt;/a&gt; to use the Admin UI.&lt;/p&gt;
          &lt;hr&gt;
          &lt;p&gt;
              Remember to &lt;a href='https://github.com/keystonejs/keystone' target='_blank'&gt;Star KeystoneJS on GitHub&lt;/a&gt; and
              &lt;a href='https://twitter.com/keystonejs' target='_blank'&gt;follow @keystonejs&lt;/a&gt; on twitter for updates.
          &lt;/p&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and I want to add the user name to the view code somthing like </p>
  
  <pre><code>&lt;h1&gt;Welcome Tim&lt;/h1&gt;
  </code></pre>
  
  <p>I have tried </p>
  
  <pre><code>&lt;h1&gt;Welcome {{locals.user}}&lt;/h1&gt;
  &lt;h1&gt;Welcome {{locals.user.name}}&lt;/h1&gt;
  &lt;h1&gt;Welcome {{req.user}}&lt;/h1&gt; (using an Express request)
  </code></pre>
  
  <p>But to no avail.  How do I find the user name from the User model?  Do I have to define something else in the ..\routes\views first?</p>
  
  <p>If anyone could help with an example or pointer in the right direction, Id be very grateful indeed!</p>