title: sorting and pagination cakephp
body: <p>in my controller I have this</p>
  
  <pre><code>public function station_users($id=null){
          $users = $this-&gt;User-&gt;find('all',array('conditions'=&gt;array('test_id'=&gt;$this-&gt;params['named']['test_id'])));
  
          $this-&gt;set('users', $users);
          $this-&gt;render("station_users",'ajax');
      }
  </code></pre>
  
  <p>I am getting all the users for a certain test id but now my sort doesnt work. how can I add pagination.
  I tried </p>
  
  <pre><code>$this-&gt;User-&gt;recursive = 0;
          $this-&gt;set('users', $this-&gt;paginate());
  </code></pre>
  
  <p>and that didnt work
  thanks</p>