ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilUserFilter Class Reference

user filter More...

+ Collaboration diagram for ilUserFilter:

Public Member Functions

 filter ($a_user_ids)
 Filter user accounts. More...
 
 getFolderIds ()
 Get accessible user folder (cat and usrf) ids. More...
 

Static Public Member Functions

static getInstance ()
 Singelton get instance. More...
 

Protected Member Functions

 __construct ()
 Singleton constructor. More...
 

Private Member Functions

 init ()
 Init. More...
 

Private Attributes

 $settings = null
 
 $folder_ids = array()
 

Static Private Attributes

static $instance = null
 

Detailed Description

user filter

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 15 of file class.ilUserFilter.php.

Constructor & Destructor Documentation

◆ __construct()

ilUserFilter::__construct ( )
protected

Singleton constructor.

Returns

Definition at line 28 of file class.ilUserFilter.php.

References init().

29  {
30  $this->init();
31  }
+ Here is the call graph for this function:

Member Function Documentation

◆ filter()

ilUserFilter::filter (   $a_user_ids)

Filter user accounts.

Returns

Definition at line 49 of file class.ilUserFilter.php.

References $ilDB, $query, $res, $row, array, ilDBConstants\FETCHMODE_ASSOC, and ilUserAccountSettings\getInstance().

50  {
51  global $ilDB;
52 
53  if (!ilUserAccountSettings::getInstance()->isUserAccessRestricted()) {
54  return $a_user_ids;
55  }
56 
57  $query = "SELECT usr_id FROM usr_data " .
58  "WHERE " . $ilDB->in('time_limit_owner', $this->folder_ids, false, 'integer') . " " .
59  "AND " . $ilDB->in('usr_id', $a_user_ids, false, 'integer');
60  $res = $ilDB->query($query);
61 
62  $filtered = array();
63  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) {
64  $filtered[] = $row['usr_id'];
65  }
66  return $filtered;
67  }
foreach($_POST as $key=> $value) $res
$query
Create styles array
The data for the language used.
static getInstance()
Singelton get instance.
global $ilDB
+ Here is the call graph for this function:

◆ getFolderIds()

ilUserFilter::getFolderIds ( )

Get accessible user folder (cat and usrf) ids.

Returns

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

References $folder_ids, and array.

74  {
75  return (array) $this->folder_ids;
76  }
Create styles array
The data for the language used.

◆ getInstance()

static ilUserFilter::getInstance ( )
static

Singelton get instance.

Returns
object ilUserFilter

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

Referenced by ilObjUser\_writeHistory(), ilUserAutoComplete\getSelectPart(), ilMailAutoCompleteUserProvider\getWherePart(), ilRepositorySearchGUI\listUsers(), ilRepositoryObjectResultTableGUI\parseObjectIds(), ilRepositorySearchGUI\performSearch(), ilInternalLink\searchUsers(), and ilMailSearchGUI\showResults().

38  {
39  if (self::$instance) {
40  return self::$instance;
41  }
42  return self::$instance = new ilUserFilter();
43  }
+ Here is the caller graph for this function:

◆ init()

ilUserFilter::init ( )
private

Init.

Returns

Definition at line 82 of file class.ilUserFilter.php.

References ilLocalUser\_getFolderIds(), and ilUserAccountSettings\getInstance().

Referenced by __construct().

83  {
84  if (ilUserAccountSettings::getInstance()->isUserAccessRestricted()) {
85  include_once './Services/User/classes/class.ilLocalUser.php';
86  $this->folder_ids = ilLocalUser::_getFolderIds();
87  }
88  }
static getInstance()
Singelton get instance.
static _getFolderIds()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $folder_ids

ilUserFilter::$folder_ids = array()
private

Definition at line 21 of file class.ilUserFilter.php.

Referenced by getFolderIds().

◆ $instance

ilUserFilter::$instance = null
staticprivate

Definition at line 17 of file class.ilUserFilter.php.

◆ $settings

ilUserFilter::$settings = null
private

Definition at line 19 of file class.ilUserFilter.php.


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