public function getItemsByUserID($userID) { $conditions = array('user_id' => $userID); $all = $this->find('all', array('conditions' => $conditions)); $itemids = array(); // var_dump($all); foreach ($all as $k => $v) { $itemids[] = $v['ItemsMonitor']['item_id']; } App::import('Model', 'Item'); $item = new Item(); $ret = $item->getItemByInId($itemids); return $ret; }