ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilLocalUser Class Reference
+ Collaboration diagram for ilLocalUser:

Public Member Functions

 __construct ($a_parent_id)
 Constructor @access public. More...
 
 setParentId ($a_parent_id)
 
 getParentId ()
 

Static Public Member Functions

static _getUserData ($a_filter)
 
static _getFolderIds ()
 
static _getAllUserIds ($a_filter=0)
 
static _getUserFolderId ()
 

Data Fields

 $db
 
 $parent_id
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilLocalUser::__construct (   $a_parent_id)

Constructor @access public.

Parameters
stringscriptname
intuser_id

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

25 {
26 global $ilDB;
27
28 $this->db = $ilDB;
29 $this->parent_id = $a_parent_id;
30 }
global $ilDB

References $ilDB.

Member Function Documentation

◆ _getAllUserIds()

static ilLocalUser::_getAllUserIds (   $a_filter = 0)
static

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

81 {
82 global $ilDB;
83 switch ($a_filter) {
84 case 0:
86 $where = "WHERE " . $ilDB->in("time_limit_owner", ilLocalUser::_getFolderIds(), false, "integer") . " ";
87 //$where .= '(';
88 //$where .= implode(",",ilUtil::quoteArray(ilLocalUser::_getFolderIds()));
89 //$where .= ')';
90 } else {
91 //$where = "WHERE time_limit_owner IN ('')";
92 return array();
93 }
94
95 break;
96
97 default:
98 $where = "WHERE time_limit_owner = " . $ilDB->quote($a_filter, "integer") . " ";
99
100 break;
101 }
102
103 $query = "SELECT usr_id FROM usr_data " . $where;
104 $res = $ilDB->query($query);
105
106 while ($row = $ilDB->fetchObject($res)) {
107 $users[] = $row->usr_id;
108 }
109
110 return $users ? $users : array();
111 }
$users
Definition: authpage.php:44
static _getFolderIds()
$query
foreach($_POST as $key=> $value) $res

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

Referenced by ilLocalUserGUI\assignSave(), ilObjCategoryGUI\assignSaveObject(), ilLocalUserGUI\performDeleteUsers(), and ilObjCategoryGUI\performDeleteUsersObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getFolderIds()

static ilLocalUser::_getFolderIds ( )
static

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

56 {
57 global $ilDB,$rbacsystem;
58
59 $query = "SELECT DISTINCT(time_limit_owner) as parent_id FROM usr_data ";
60
61 $res = $ilDB->query($query);
62 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
63 // Workaround for users with time limit owner "0".
64 if (!$row->parent_id) {
65 if ($rbacsystem->checkAccess('read_users', USER_FOLDER_ID)) {
66 $parent[] = $row->parent_id;
67 }
68 continue;
69 }
70
71 if ($rbacsystem->checkAccess('read_users', $row->parent_id) or $rbacsystem->checkAccess('cat_administrate_users', $row->parent_id)) {
72 if ($row->parent_id) {
73 $parent[] = $row->parent_id;
74 }
75 }
76 }
77 return $parent ? $parent : array();
78 }
const USER_FOLDER_ID
Class ilObjUserFolder.

References $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, and USER_FOLDER_ID.

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

+ Here is the caller graph for this function:

◆ _getUserData()

static ilLocalUser::_getUserData (   $a_filter)
static

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

42 {
43 include_once './Services/User/classes/class.ilObjUser.php';
44
45 $users_data = ilObjUser::_getAllUserData(array("login","firstname","lastname","time_limit_owner"), -1);
46
47 foreach ($users_data as $usr_data) {
48 if (!$a_filter or $a_filter == $usr_data['time_limit_owner']) {
49 $users[] = $usr_data;
50 }
51 }
52 return $users ? $users : array();
53 }
static _getAllUserData($a_fields=null, $active=-1)
STATIC METHOD get all user data.

References $users, and ilObjUser\_getAllUserData().

+ Here is the call graph for this function:

◆ _getUserFolderId()

static ilLocalUser::_getUserFolderId ( )
static

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

114 {
115 return 7;
116 }

◆ getParentId()

ilLocalUser::getParentId ( )

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

37 {
38 return $this->parent_id;
39 }

References $parent_id.

◆ setParentId()

ilLocalUser::setParentId (   $a_parent_id)

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

33 {
34 $this->parent_id = $a_parent_id;
35 }

Field Documentation

◆ $db

ilLocalUser::$db

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

◆ $parent_id

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: