Use the beforeFind()
(http://book.cakephp.org/view/680/beforeFind) callback for this kind of thing. Here's one I use from time to time that ensures only active records are returned:
function beforeFind( $queryData )
{
$conditions = $queryData['conditions'];
if( !is_array( $conditions ) ) {
if( !$conditions ) {
$conditions = array();
}
else {
$conditions = array( $conditions );
}
}
if( !array_key_exists( $conditions, 'active' ) && !isset( $conditions[$this->alias . '.active'] ) ) {
$conditions[$this->alias . '.active'] = 1;
}
return true;
}
That's a bit off the cuff, so the syntax may not be exact, but it should give you something to start with. I think everything's in order except, perhaps, the argument order in a few function calls. Anyway, it should be close.