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

Public Member Functions

 ilLocalUser ($a_parent_id)
 Constructor public.
 setParentId ($a_parent_id)
 getParentId ()
 _getUserData ($a_filter)
 _getAllUserIds ($a_filter=0)
 _getUserFolderId ()

Static Public Member Functions

static _getFolderIds ()

Data Fields

 $db
 $parent_id

Detailed Description

Definition at line 12 of file class.ilLocalUser.php.

Member Function Documentation

ilLocalUser::_getAllUserIds (   $a_filter = 0)

Definition at line 88 of file class.ilLocalUser.php.

References $ilDB, $query, $res, $row, and _getFolderIds().

Referenced by ilObjCategoryGUI\assignSaveObject(), and ilObjCategoryGUI\performDeleteUsersObject().

{
global $ilDB;
switch($a_filter)
{
case 0:
{
$where = "WHERE ".$ilDB->in("time_limit_owner", ilLocalUser::_getFolderIds(), false, "integer")." ";
//$where .= '(';
//$where .= implode(",",ilUtil::quoteArray(ilLocalUser::_getFolderIds()));
//$where .= ')';
}
else
{
//$where = "WHERE time_limit_owner IN ('')";
return array();
}
break;
default:
$where = "WHERE time_limit_owner = ".$ilDB->quote($a_filter, "integer")." ";
break;
}
$query = "SELECT usr_id FROM usr_data ".$where;
$res = $ilDB->query($query);
while($row = $ilDB->fetchObject($res))
{
$users[] = $row->usr_id;
}
return $users ? $users : array();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilLocalUser::_getFolderIds ( )
static

Definition at line 59 of file class.ilLocalUser.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and USER_FOLDER_ID.

Referenced by _getAllUserIds(), ilUserTableGUI\getItems(), ilUserFilter\init(), and ilUserTableGUI\initFilter().

{
global $ilDB,$rbacsystem;
$query = "SELECT DISTINCT(time_limit_owner) as parent_id FROM usr_data ";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
// Workaround for users with time limit owner "0".
if(!$row->parent_id)
{
if($rbacsystem->checkAccess('read_users',USER_FOLDER_ID))
{
$parent[] = $row->parent_id;
}
continue;
}
if($rbacsystem->checkAccess('read_users',$row->parent_id) or $rbacsystem->checkAccess('cat_administrate_users',$row->parent_id))
{
if($row->parent_id)
{
$parent[] = $row->parent_id;
}
}
}
return $parent ? $parent : array();
}

+ Here is the caller graph for this function:

ilLocalUser::_getUserData (   $a_filter)

Definition at line 43 of file class.ilLocalUser.php.

References ilObjUser\_getAllUserData().

{
include_once './Services/User/classes/class.ilObjUser.php';
$users_data = ilObjUser::_getAllUserData(array("login","firstname","lastname","time_limit_owner"),-1);
foreach($users_data as $usr_data)
{
if(!$a_filter or $a_filter == $usr_data['time_limit_owner'])
{
$users[] = $usr_data;
}
}
return $users ? $users : array();
}

+ Here is the call graph for this function:

ilLocalUser::_getUserFolderId ( )

Definition at line 127 of file class.ilLocalUser.php.

Referenced by ilObjCategoryGUI\__buildFilterSelect().

{
return 7;
}

+ Here is the caller graph for this function:

ilLocalUser::getParentId ( )

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

References $parent_id.

{
}
ilLocalUser::ilLocalUser (   $a_parent_id)

Constructor public.

Parameters
stringscriptname
intuser_id

Definition at line 24 of file class.ilLocalUser.php.

References $ilDB.

{
global $ilDB;
$this->db =& $ilDB;
$this->parent_id = $a_parent_id;
}
ilLocalUser::setParentId (   $a_parent_id)

Definition at line 33 of file class.ilLocalUser.php.

{
$this->parent_id = $a_parent_id;
}

Field Documentation

ilLocalUser::$db

Definition at line 14 of file class.ilLocalUser.php.

ilLocalUser::$parent_id

Definition at line 16 of file class.ilLocalUser.php.

Referenced by getParentId().


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