/**
  * Get all selectable columns
  *
  * @return array
  *
  * @global ilRbacReview $rbacreview
  */
 public function getSelectableColumns()
 {
     global $rbacreview, $ilUser;
     if (!self::$all_selectable_cols) {
         include_once './Services/Search/classes/class.ilUserSearchOptions.php';
         $columns = ilUserSearchOptions::getSelectableColumnInfo($rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID));
         if ($this->admin_mode) {
             // #11293
             $columns['access_until'] = array('txt' => $this->lng->txt('access_until'));
             $columns['last_login'] = array('txt' => $this->lng->txt('last_login'));
         }
         self::$all_selectable_cols = $columns;
     }
     return self::$all_selectable_cols;
 }
 /**
  * Show usr table
  * @return 
  * @param object $a_usr_ids
  */
 protected function showSearchUserTable($a_usr_ids, $a_parent_cmd)
 {
     $is_in_admin = $_REQUEST['baseClass'] == 'ilAdministrationGUI';
     if ($is_in_admin) {
         // remember link target to admin search gui (this)
         $_SESSION["usr_search_link"] = $this->ctrl->getLinkTarget($this, 'show');
     }
     include_once './Services/Search/classes/class.ilRepositoryUserResultTableGUI.php';
     $table = new ilRepositoryUserResultTableGUI($this, $a_parent_cmd, $is_in_admin);
     if (count($this->add_options)) {
         $table->addMultiItemSelectionButton('selectedCommand', $this->add_options, 'handleMultiCommand', $this->lng->txt('execute'));
     } else {
         $table->addMultiCommand('addUser', $this->lng->txt('btn_add'));
     }
     $table->parseUserIds($a_usr_ids);
     $this->tpl->setVariable('RES_TABLE', $table->getHTML());
 }
Ejemplo n.º 3
0
 /**
  * Perform search 
  */
 protected function performSearch()
 {
     include_once './Services/Search/classes/Lucene/class.ilLuceneSearcher.php';
     include_once './Services/Search/classes/Lucene/class.ilLuceneQueryParser.php';
     $qp = new ilLuceneQueryParser($this->search_cache->getQuery());
     $qp->parse();
     $searcher = ilLuceneSearcher::getInstance($qp);
     $searcher->setType(ilLuceneSearcher::TYPE_USER);
     $searcher->search();
     $this->showSearchForm();
     include_once './Services/Search/classes/class.ilRepositoryUserResultTableGUI.php';
     $user_table = new ilRepositoryUserResultTableGUI($this, 'performSearch', false, ilRepositoryUserResultTableGUI::TYPE_GLOBAL_SEARCH);
     $user_table->setLuceneResult($searcher->getResult());
     $user_table->parseUserIds($searcher->getResult()->getCandidates());
     $GLOBALS['tpl']->setVariable('SEARCH_RESULTS', $user_table->getHTML());
     return true;
 }