title: Cannot reassign $this variable
body: <p>I'm trying to figure out why I'm getting a cannot reassign $this error message for the public function isUsernameAvailable($this->input->post('username')) line. I've looked over my code and can't locate the cause of why I can't do this. What the function is used for is a post jquery function with json sent to php.</p>
  
  <pre><code>public function isUsernameAvailable($username)
  {
      if ($this-&gt;usersmodel-&gt;isUsernameAvailable($username))
      {
          echo '{"username":"found"}';
      }
      else
      {
          echo '{"username":"notfound"}';
      }        
  }
  </code></pre>
  
  <p>jQuery</p>
  
  <pre><code>$('#username').blur(function(){
      $.post('register/isUsernameAvailable', {"username":$(this).val()}, function(data){if(data.username == "found"){alert('username already in use');}}, 'json');
  });
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p><strong>UPDATE :</strong></p>
  
  <p>I"m trying to find out if this is really a PHP issue or jQuery issue.</p>
  
  <p>After it does the POST request it sends this as a parameter:</p>
  
  <p>username testusername</p>
  
  <p>In the response I get this:</p>
  
  <p></p>
  
  A PHP Error was encountered
  
  <p>Severity: Warning</p>
  
  <p>Message:  Missing argument 1 for Register::isUsernameAvailable()</p>
  
  <p>Filename: controllers/register.php</p>
  
  <p>Line Number: 118</p>
  
  <p></p>
  
  A PHP Error was encountered
  
  <p>Severity: Notice</p>
  
  <p>Message:  Undefined variable: username</p>
  
  <p>Filename: controllers/register.php</p>
  
  <p>Line Number: 120</p>
  
  <p>{"username":"notfound"}</p>