public function findPhotoListByUserId($userId, $page, $limit, array $exclude = array(), $status = PHOTO_BOL_PhotoDao::STATUS_APPROVED) { if (empty($userId)) { return array(); } $first = ($page - 1) * $limit; $photos = $this->photoDao->findPhotoListByUserId($userId, $first, $limit, $this->isCheckPrivacy($userId), $exclude, $status); if ($photos) { foreach ($photos as $key => $photo) { $photos[$key]['url'] = $this->getPhotoUrlByType($photo['id'], self::TYPE_PREVIEW, $photo['hash'], !empty($photo['dimension']) ? $photo['dimension'] : FALSE); } } return $photos; }