/**
  * Show tasks for a given user
  *
  * @param void
  * @return null
  */
 function user_tasks()
 {
     $filter = new AssignmentFilter();
     $filter->setUserFilter(USER_FILTER_LOGGED_USER);
     $filter->setProjectFilter(PROJECT_FILTER_SELECTED);
     $filter->setProjectFilterData(array($this->active_project->getId()));
     $filter->setStatusFilter(STATUS_FILTER_ACTIVE);
     $filter->setOrderBy('priority DESC');
     $filter->setObjectsPerPage(30);
     if ($this->request->isApiCall()) {
         $this->serveData(AssignmentFilters::executeFilter($this->logged_user, $filter, false), 'assignments');
     } else {
         list($assignments, $pagination) = AssignmentFilters::executeFilter($this->logged_user, $filter, null, (int) $this->request->get('page'));
         $this->smarty->assign(array('assignments' => $assignments, 'pagination' => $pagination));
     }
     // if
 }
 /**
  * Render iCalendar feed
  *
  * @param void
  * @return null
  */
 function ical()
 {
     $filter = new AssignmentFilter();
     $filter->setUserFilter(USER_FILTER_SELECTED);
     $filter->setUserFilterData(array($this->active_user->getId()));
     $filter->setProjectFilter(PROJECT_FILTER_ACTIVE);
     $filter->setStatusFilter(STATUS_FILTER_ACTIVE);
     render_icalendar(lang(":user's calendar", array('user' => $this->active_user->getDisplayName())), AssignmentFilters::executeFilter($this->logged_user, $filter, false));
     die;
 }