ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilUserSearch Class Reference
+ Inheritance diagram for ilUserSearch:
+ Collaboration diagram for ilUserSearch:

Public Member Functions

 ilUserSearch (&$query_parser)
 Constructor public.
 enableActiveCheck ($a_enabled)
 search only active accounts
 enableInactiveCheck ($a_enabled)
 search only inactive accounts
performSearch ()
- Public Member Functions inherited from ilAbstractSearch
 ilAbstractSearch (&$qp_obj)
 Constructor public.
 setFields ($a_fields)
 Set fields to search.
 getFields ()
 Get fields to search.
 setFilter ($a_filter)
 set object type to search in
 setIdFilter ($a_id_filter)
 Set id filter Filters search by given object id.
 getIdFilter ()
 Get Id filter.
 appendToFilter ($a_type)
 Append object type to filter.
 getFilter ()
 get object type to search in
 __createLocateString ()
 build locate string in case of AND search
 __prepareFound (&$row)

Private Attributes

 $active_check = false
 $inactive_check = false

Additional Inherited Members

- Data Fields inherited from ilAbstractSearch
 $db = null
 $query_parser = null
 $search_result = null
 $object_types

Detailed Description

Definition at line 35 of file class.ilUserSearch.php.

Member Function Documentation

ilUserSearch::enableActiveCheck (   $a_enabled)

search only active accounts

public

Parameters

Definition at line 56 of file class.ilUserSearch.php.

{
$this->active_check = $a_enabled;
}
ilUserSearch::enableInactiveCheck (   $a_enabled)

search only inactive accounts

public

Parameters

Definition at line 68 of file class.ilUserSearch.php.

{
$this->inactive_check = $a_enabled;
}
ilUserSearch::ilUserSearch ( $query_parser)

Constructor public.

Definition at line 44 of file class.ilUserSearch.php.

References ilAbstractSearch\$query_parser, and ilAbstractSearch\ilAbstractSearch().

Referenced by ilLikeUserSearch\ilLikeUserSearch().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilUserSearch::performSearch ( )

Reimplemented from ilAbstractSearch.

Definition at line 73 of file class.ilUserSearch.php.

References $query, $res, $row, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), and DB_FETCHMODE_OBJECT.

{
$where = $this->__createWhereCondition();
$locate = $this->__createLocateString();
$query = "SELECT usr_id ".
$locate.
"FROM usr_data ".
$where;
if($this->active_check)
{
$query .= 'AND active = 1 ';
}
elseif($this->inactive_check)
{
$query .= 'AND active = 0 ';
}
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->search_result->addEntry($row->usr_id,'usr',$this->__prepareFound($row));
}
}

+ Here is the call graph for this function:

Field Documentation

ilUserSearch::$active_check = false
private

Definition at line 37 of file class.ilUserSearch.php.

ilUserSearch::$inactive_check = false
private

Definition at line 38 of file class.ilUserSearch.php.


The documentation for this class was generated from the following file: