ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 ($access_with_orgunit=false)
 
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 $DIC;
27
28 $ilDB = $DIC['ilDB'];
29
30 $this->db = $ilDB;
31 $this->parent_id = $a_parent_id;
32 }
global $ilDB
$DIC
Definition: xapitoken.php:46

References $DIC, and $ilDB.

Member Function Documentation

◆ _getAllUserIds()

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

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

90 {
91 global $DIC;
92
93 $ilDB = $DIC['ilDB'];
94 switch ($a_filter) {
95 case 0:
97 $where = "WHERE " . $ilDB->in("time_limit_owner", ilLocalUser::_getFolderIds(), false, "integer") . " ";
98 //$where .= '(';
99 //$where .= implode(",",ilUtil::quoteArray(ilLocalUser::_getFolderIds()));
100 //$where .= ')';
101 } else {
102 //$where = "WHERE time_limit_owner IN ('')";
103 return array();
104 }
105
106 break;
107
108 default:
109 $where = "WHERE time_limit_owner = " . $ilDB->quote($a_filter, "integer") . " ";
110
111 break;
112 }
113
114 $query = "SELECT usr_id FROM usr_data " . $where;
115 $res = $ilDB->query($query);
116
117 while ($row = $ilDB->fetchObject($res)) {
118 $users[] = $row->usr_id;
119 }
120
121 return $users ? $users : array();
122 }
static _getFolderIds($access_with_orgunit=false)
$query
foreach($_POST as $key=> $value) $res

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

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

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

◆ _getFolderIds()

static ilLocalUser::_getFolderIds (   $access_with_orgunit = false)
static

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

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

References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, ilObjUserFolder\ORG_OP_EDIT_USER_ACCOUNTS, 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 43 of file class.ilLocalUser.php.

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

References ilObjUser\_getAllUserData().

+ Here is the call graph for this function:

◆ _getUserFolderId()

static ilLocalUser::_getUserFolderId ( )
static

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

125 {
126 return 7;
127 }

Referenced by ilObjUserFolderGUI\getActionUserIds(), and ilObjUserFolderGUI\viewObject().

+ Here is the caller graph for this function:

◆ getParentId()

ilLocalUser::getParentId ( )

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

39 {
40 return $this->parent_id;
41 }

References $parent_id.

◆ setParentId()

ilLocalUser::setParentId (   $a_parent_id)

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

35 {
36 $this->parent_id = $a_parent_id;
37 }

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: