title: why smarty not considering session variables?
body: <p>Why smarty 3 doesn't consider codeIgniter session variables:</p>
  
  <pre><code>$this-&gt;session-&gt;set_userdata('userId', $res['id']);  // this doesn't work 
  
  $_SESSION['userId']=$res['id']; // this works.
  </code></pre>
  
  <p>I am accessing this in smarty as:</p>
  
  <pre><code>{$smarty.session.userId}  
  </code></pre>