title: How to access model to query database from a helper function?
body: <p>I am trying to create authentication for my php website. I am using the codeigniter framework. I will have to validate the session in all the pages of my website. So to avoid the code repetition, i am planning to do it in a helper function. Now that my user credentials are 
  in my database i would like to access the model to query the database from the helper 
  function. In a controller class i would have done this by using </p>
  
  <pre><code>$this-&gt;load-&gt;model('user_model');
  </code></pre>
  
  <p>Please let me know its equivalent in a helper file. Any kind of suggestion in approach is also appreciated. Thanks in advance.</p>