title: Undefined property: user::$load
body: <p>I got the following error: </p>
  
  <blockquote>
    <p>Undefined property: user::$load </p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;?php defined('BASEPATH') OR exit('No direct script access allowed');
  
  class users extends CI_Controller{
  
  
      function _construct(){
              parent::_construct();
  
          }  
  
      function index(){
          $this-&gt;load-&gt;view('login');
      }
      function Login(){
          $this-&gt;load-&gt;model('user');
          $query=$this-&gt;user-&gt;validate();
          if($query){
                  $data=array(
                        'username'=&gt;$this-&gt;input-&gt;post['UserName'],
                        'is_logged_in'=&gt; true
                  );
              $this-&gt;session-&gt;set_userdata($data);
              $this-&gt;load-&gt;view('purchaser_home');
          }
          else{
              $this-&gt;index();
          }
      }
  }
  ?&gt;
  </code></pre>
  
  <p>Why is the above error happening?</p>