How to get all Users with a "order by" latest Posts in a HABTM relation with CakePHP
I have a HABTM relation between Post and User model.

Now I want to receive all Users ordered by Post.published.

Something like this:

    ...
    var $paginate = array(
    	'limit' => 8,
    	'recursive' => 1,
    	'fields' => array('id', 'username', 'image')
    );
    function index() {
    	$this->paginate['conditions'] = array('User.state'=>true);
    	$this->paginate['order'] = 'Post.published DESC';
    	$this->set('authors', $this->paginate());
    }
    ...
How can I do this? Is it possible?
How to get all Users with a "order by" latest Posts in a HABTM relation with CakePHP
===

I have a HABTM relation between Post and User model.

Now I want to receive all Users ordered by Post.published.

Something like this:

    ...
    var $paginate = array(
    	'limit' => 8,
    	'recursive' => 1,
    	'fields' => array('id', 'username', 'image')
    );
    function index() {
    	$this->paginate['conditions'] = array('User.state'=>true);
    	$this->paginate['order'] = 'Post.published DESC';
    	$this->set('authors', $this->paginate());
    }
    ...
How can I do this? Is it possible?