title: Meteor currentUser
body: <p>Using the node.js framework Meteor -</p>
  
  <p>how come the <code>currentUser</code> variable is <em>defined</em> in a template such as here:</p>
  
  <pre><code>&lt;template name="main_template"&gt;
    &lt;div class="container"&gt;
    {{#if currentUser}}
    {{&gt; add_player_form_template}}
    {{/if}}
    &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>but when I call <code>currentUser</code> from the console, it's <em>undefined</em>:</p>
  
  <p><img src="https://i.stack.imgur.com/7sVj7.jpg" alt="enter image description here"></p>
  
  <p>however, <code>Meteor.userId</code> is defined:</p>
  
  <p><img src="https://i.stack.imgur.com/jz2JQ.jpg" alt="enter image description here"></p>
  
  <p>why is this?</p>