ILIAS  Release_4_0_x_branch Revision 61816
 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)
 _getFolderIds ()
 _getAllUserIds ($a_filter=0)
 _getUserFolderId ()

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 78 of file class.ilLocalUser.php.

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

Referenced by ilObjCategoryGUI\assignSaveObject(), ilObjCategoryGUI\listUsersObject(), 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:

ilLocalUser::_getFolderIds ( )

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

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

Referenced by _getAllUserIds(), and ilObjCategoryGUI\listUsersObject().

{
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))
{
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().

Referenced by ilObjCategoryGUI\listUsersObject().

{
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:

+ Here is the caller graph for this function:

ilLocalUser::_getUserFolderId ( )

Definition at line 117 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: