ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilUserFilter Class Reference

user filter More...

+ Collaboration diagram for ilUserFilter:

Public Member Functions

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

Static Public Member Functions

static getInstance ()
 Singelton get instance.

Protected Member Functions

 __construct ()
 Singleton constructor.

Private Member Functions

 init ()
 Init.

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

ilUserFilter::__construct ( )
protected

Singleton constructor.

Returns

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

References init().

{
$this->init();
}

+ Here is the call graph for this function:

Member Function Documentation

ilUserFilter::filter (   $a_user_ids)

Filter user accounts.

Returns

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

References $query, $res, $row, DB_FETCHMODE_ASSOC, and ilUserAccountSettings\getInstance().

{
global $ilDB;
if(!ilUserAccountSettings::getInstance()->isUserAccessRestricted())
{
return $a_user_ids;
}
$query = "SELECT usr_id FROM usr_data ".
"WHERE ".$ilDB->in('time_limit_owner',$this->folder_ids,false,'integer')." ".
"AND ".$ilDB->in('usr_id',$a_user_ids,false,'integer');
$res = $ilDB->query($query);
$filtered = array();
while($row = $res->fetchRow(DB_FETCHMODE_ASSOC))
{
$filtered[] = $row['usr_id'];
}
return $filtered;
}

+ Here is the call graph for this function:

ilUserFilter::getFolderIds ( )

Get accessible user folder (cat and usrf) ids.

Returns

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

References $folder_ids.

{
return (array) $this->folder_ids;
}
static ilUserFilter::getInstance ( )
static

Singelton get instance.

Returns
object ilUserFilter

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

References $instance.

Referenced by ilObjUser\_getUsersOnline(), ilRepositorySearchGUI\listUsers(), ilRepositoryObjectResultTableGUI\parseObjectIds(), ilRepositorySearchGUI\performSearch(), and ilMailSearchGUI\showResults().

{
if(self::$instance)
{
}
return self::$instance = new ilUserFilter();
}

+ Here is the caller graph for this function:

ilUserFilter::init ( )
private

Init.

Returns

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

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

Referenced by __construct().

{
if(ilUserAccountSettings::getInstance()->isUserAccessRestricted())
{
include_once './Services/User/classes/class.ilLocalUser.php';
$this->folder_ids = ilLocalUser::_getFolderIds();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilUserFilter::$folder_ids = array()
private

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

Referenced by getFolderIds().

ilUserFilter::$instance = null
staticprivate

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

Referenced by getInstance().

ilUserFilter::$settings = null
private

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


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