Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00033 include_once 'Services/Search/classes/class.ilAbstractSearch.php';
00034
00035 class ilUserSearch extends ilAbstractSearch
00036 {
00037 var $active_check = false;
00042 function ilUserSearch(&$query_parser)
00043 {
00044 parent::ilAbstractSearch($query_parser);
00045 }
00046
00054 function enableActiveCheck($a_enabled)
00055 {
00056 $this->active_check = $a_enabled;
00057 }
00058
00059 function &performSearch()
00060 {
00061 $where = $this->__createWhereCondition();
00062 $locate = $this->__createLocateString();
00063
00064 $query = "SELECT usr_id ".
00065 $locate.
00066 "FROM usr_data ".
00067 $where;
00068 if($this->active_check)
00069 {
00070 $query .= 'AND active = 1 ';
00071 }
00072
00073 $res = $this->db->query($query);
00074 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
00075 {
00076 $this->search_result->addEntry($row->usr_id,'usr',$this->__prepareFound($row));
00077 }
00078 return $this->search_result;
00079 }
00080 }
00081 ?>