/** * Gets the list of users * * @return mixed An array of data items on success, false on failure. * @since 1.6 */ public function getItems() { $db = $this->getDbo(); $search = $this->getState('filter.search'); if ($search != '') { $searchEscaped = $db->Quote('%' . $db->escape($search, true) . '%', false); } else { $searchEscaped = ""; } $pagination = $this->getPagination(); $limitstart = $pagination->limitstart; $limit = $pagination->limit; $listOrder = $this->state->get('list.ordering'); $listDirn = $this->state->get('list.direction'); $filter_order = $listOrder; $filter_order_Dir = $listDirn; $filter_type = $this->getState('filter.state'); switch ($filter_type) { case 'moodle': $users = JoomdleHelperContent::getMoodleUsers($limitstart, $limit, $filter_order, $filter_order_Dir, $search); break; case 'joomla': $users = JoomdleHelperContent::getJoomlaUsers($limitstart, $limit, $filter_order, $filter_order_Dir, $searchEscaped); break; case 'joomdle': $users = JoomdleHelperContent::getJoomdleUsers($limitstart, $limit, $filter_order, $filter_order_Dir, $searchEscaped); break; case 'not_joomdle': $users = JoomdleHelperContent::getNotJoomdleUsers($limitstart, $limit, $filter_order, $filter_order_Dir, $search); break; default: $users = JoomdleHelperContent::getAllUsers($limitstart, $limit, $filter_order, $filter_order_Dir, $search); break; } return $users; }