public function getUserList() { /** * @var $ilUser ilObjUser */ global $ilUser; require_once 'Services/User/classes/class.ilUserAutoComplete.php'; $auto = new ilUserAutoComplete(); $auto->setUser($ilUser); $auto->setPrivacyMode(ilUserAutoComplete::PRIVACY_MODE_RESPECT_USER_SETTING); if ($ilUser->isAnonymous()) { $auto->setSearchType(ilUserAutoComplete::SEARCH_TYPE_EQUALS); } $auto->setSearchFields(array('firstname', 'lastname')); $auto->setResultField('login'); $auto->enableFieldSearchableCheck(true); echo $auto->getList($_REQUEST['q']); exit; }
/** * Do auto completion * @return void */ protected function doUserAutoComplete() { if (!isset($_GET['autoCompleteField'])) { $a_fields = array('login', 'firstname', 'lastname', 'email'); $result_field = 'login'; } else { $a_fields = array((string) $_GET['autoCompleteField']); $result_field = (string) $_GET['autoCompleteField']; } $GLOBALS['ilLog']->write(print_r($a_fields, true)); include_once './Services/User/classes/class.ilUserAutoComplete.php'; $auto = new ilUserAutoComplete(); $auto->setSearchFields($a_fields); $auto->setResultField($result_field); $auto->enableFieldSearchableCheck(true); echo $auto->getList($_REQUEST['term']); exit; }
/** * Method that realizes the auto-completion for the participants list. */ public function doUserAutoComplete() { $search_fields = array("login", "firstname", "lastname", "email"); $result_field = "login"; $auto = new ilUserAutoComplete(); $auto->setSearchFields($search_fields); $auto->setResultField($result_field); $auto->enableFieldSearchableCheck(true); echo $auto->getList($_REQUEST['term']); exit; }
function doAutoCompleteObject() { $fields = array('login', 'firstname', 'lastname', 'email'); include_once './Services/User/classes/class.ilUserAutoComplete.php'; $auto = new ilUserAutoComplete(); $auto->setSearchFields($fields); $auto->setResultField('login'); $auto->enableFieldSearchableCheck(true); echo $auto->getList(ilUtil::stripSlashes($_REQUEST['term'])); exit; }
/** * Do auto completion * @return void */ protected function doUserAutoComplete() { if (!isset($_GET['autoCompleteField'])) { $a_fields = array('login', 'firstname', 'lastname', 'email'); $result_field = 'login'; } else { $a_fields = array((string) $_GET['autoCompleteField']); $result_field = (string) $_GET['autoCompleteField']; } include_once './Services/User/classes/class.ilUserAutoComplete.php'; $auto = new ilUserAutoComplete(); if ($_REQUEST['fetchall']) { $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES); } $auto->setSearchFields($a_fields); $auto->setResultField($result_field); $auto->enableFieldSearchableCheck(true); echo $auto->getList($_REQUEST['term']); exit; }