ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilUserSearch Class Reference
+ Inheritance diagram for ilUserSearch:
+ Collaboration diagram for ilUserSearch:

Public Member Functions

 enableActiveCheck (bool $a_enabled)
 
 enableInactiveCheck (bool $a_enabled)
 
 performSearch ()
 
- Public Member Functions inherited from ilAbstractSearch
 __construct (ilQueryParser $qp_obj)
 
 setFields (array $a_fields)
 
 getFields ()
 
 setFilter (array $a_filter)
 
 setIdFilter (array $a_id_filter)
 
 getIdFilter ()
 
 appendToFilter (string $a_type)
 
 getFilter ()
 
 __createLocateString ()
 
 __prepareFound (object $row)
 
 performSearch ()
 

Private Attributes

bool $active_check = false
 
bool $inactive_check = false
 

Additional Inherited Members

- Protected Member Functions inherited from ilAbstractSearch
 getValidObjectTypes (ilObjectDefinition $object_definition)
 
- Protected Attributes inherited from ilAbstractSearch
ilDBInterface $db
 
ilQueryParser $query_parser
 
ilSearchResult $search_result
 
array $object_types = []
 

Detailed Description

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

Member Function Documentation

◆ enableActiveCheck()

ilUserSearch::enableActiveCheck ( bool  $a_enabled)

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

34  : void
35  {
36  $this->active_check = $a_enabled;
37  }

◆ enableInactiveCheck()

ilUserSearch::enableInactiveCheck ( bool  $a_enabled)

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

39  : void
40  {
41  $this->inactive_check = $a_enabled;
42  }

◆ performSearch()

ilUserSearch::performSearch ( )

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

References $res, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), and ilDBConstants\FETCHMODE_OBJECT.

45  {
46  $where = $this->__createWhereCondition();
47  $locate = $this->__createLocateString();
48 
49  $query = "SELECT usr_id " .
50  $locate .
51  "FROM usr_data " .
52  $where;
53  if ($this->active_check) {
54  $query .= 'AND active = 1 ';
55  } elseif ($this->inactive_check) {
56  $query .= 'AND active = 0 ';
57  }
58 
59 
60  $res = $this->db->query($query);
61  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
62  $this->search_result->addEntry((int) $row->usr_id, 'usr', $this->__prepareFound($row));
63  }
64  return $this->search_result;
65  }
$res
Definition: ltiservices.php:66
ilSearchResult $search_result
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

Field Documentation

◆ $active_check

bool ilUserSearch::$active_check = false
private

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

◆ $inactive_check

bool ilUserSearch::$inactive_check = false
private

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


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