Example #1
0
 /**
  * This returns a list of a user's albums
  * @param int $userid
  * @param int $page
  * @param int $perPage
  * @param array $options
  *
  * @return array node list of albums
  **/
 public function listAlbums($userid = false, $page = 1, $perpage = 100, $options = array())
 {
     if (!$userid) {
         if (empty($_REQUEST['userid'])) {
             $userid = vB::getUserContext()->fetchUserId();
         } else {
             $userid = $_REQUEST['userid'];
         }
     }
     $albumChannel = $this->fetchAlbumChannel();
     $contenttypeid = vB_Types::instance()->getContentTypeId('vBForum_Gallery');
     $nodeList = $this->library->listNodes($albumChannel, $page, $perpage, 0, $contenttypeid, array('includeProtected' => 1, 'userid' => $userid));
     $nodeList = $this->library->addFullContentInfo($nodeList, $options);
     $this->library->removePrivateDataFromNodeList($nodeList);
     return $nodeList;
 }