ILIAS  release_7 Revision v7.30-3-g800a261c036
ilUserUtil Class Reference

Class ilUserUtil. More...

+ Collaboration diagram for ilUserUtil:

Static Public Member Functions

static getNamePresentation ( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
 Default behaviour is: More...
 
static hasPublicProfile ($a_user_id)
 Has public profile. More...
 
static getProfileLink ($a_usr_id)
 Get link to personal profile Return empty string in case of not public profile. More...
 
static getPossibleStartingPoints ($a_force_all=false)
 Get all valid starting points. More...
 
static setStartingPoint ($a_value, $a_ref_id=null, $a_cal_view=[])
 Set starting point setting. More...
 
static getStartingPoint ()
 Get current starting point setting. More...
 
static getStartingObject ()
 Get ref id of starting object. More...
 
static getCalendarView ()
 Get specific view of calendar starting point. More...
 
static getCalendarPeriod ()
 Get time frame of calendar view. More...
 
static togglePersonalStartingPoint ($a_value)
 Toggle personal starting point setting. More...
 
static hasPersonalStartingPoint ()
 Can starting point be personalized? More...
 
static hasPersonalStartPointPref ()
 Did user set any personal starting point (yet)? More...
 
static getPersonalStartingPoint ()
 Get current personal starting point. More...
 
static setPersonalStartingPoint ($a_value, $a_ref_id=null)
 Set personal starting point setting. More...
 
static getPersonalStartingObject ()
 Get ref id of personal starting object. More...
 

Data Fields

const START_PD_OVERVIEW = 1
 
const START_PD_SUBSCRIPTION = 2
 
const START_PD_NOTES = 4
 
const START_PD_NEWS = 5
 
const START_PD_WORKSPACE = 6
 
const START_PD_PORTFOLIO = 7
 
const START_PD_SKILLS = 8
 
const START_PD_LP = 9
 
const START_PD_CALENDAR = 10
 
const START_PD_MAIL = 11
 
const START_PD_CONTACTS = 12
 
const START_PD_PROFILE = 13
 
const START_PD_SETTINGS = 14
 
const START_REPOSITORY = 15
 
const START_REPOSITORY_OBJ = 16
 
const START_PD_MYSTAFF = 17
 

Detailed Description

Class ilUserUtil.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Member Function Documentation

◆ getCalendarPeriod()

static ilUserUtil::getCalendarPeriod ( )
static

Get time frame of calendar view.

Returns
int

Definition at line 497 of file class.ilUserUtil.php.

498 {
499 global $DIC;
500
501 $ilSetting = $DIC['ilSetting'];
502
503 return $ilSetting->get("user_cal_period");
504 }
global $DIC
Definition: goto.php:24
global $ilSetting
Definition: privfeed.php:17

References $DIC, and $ilSetting.

Referenced by ilUserStartingPointGUI\getRoleStartingPointForm().

+ Here is the caller graph for this function:

◆ getCalendarView()

static ilUserUtil::getCalendarView ( )
static

Get specific view of calendar starting point.

Returns
int

Definition at line 483 of file class.ilUserUtil.php.

484 {
485 global $DIC;
486
487 $ilSetting = $DIC['ilSetting'];
488
489 return $ilSetting->get("user_calendar_view");
490 }

References $DIC, and $ilSetting.

Referenced by ilUserStartingPointGUI\getRoleStartingPointForm().

+ Here is the caller graph for this function:

◆ getNamePresentation()

static ilUserUtil::getNamePresentation (   $a_user_id,
  $a_user_image = false,
  $a_profile_link = false,
  $a_profile_back_link = "",
  $a_force_first_lastname = false,
  $a_omit_login = false,
  $a_sortable = true,
  $a_return_data_array = false,
  $a_ctrl_path = "ilpublicuserprofilegui" 
)
static

Default behaviour is:

  • lastname, firstname if public profile enabled
  • [loginname] (always) modifications by jposselt at databay . de : if $a_user_id is an array of user ids the method returns an array of "id" => "NamePresentation" pairs.

...

Parameters
booleansortable should be used in table presentions. output is "Doe, John" title is ommited

Definition at line 44 of file class.ilUserUtil.php.

54 {
55 global $DIC;
56
57 $lng = $DIC['lng'];
58 $ilCtrl = $DIC['ilCtrl'];
59 $ilDB = $DIC['ilDB'];
60
61 if (!is_array($a_ctrl_path)) {
62 $a_ctrl_path = array($a_ctrl_path);
63 }
64
65 if (!($return_as_array = is_array($a_user_id))) {
66 $a_user_id = array($a_user_id);
67 }
68
69 $sql = 'SELECT
70 a.usr_id,
71 firstname,
72 lastname,
73 title,
74 login,
75 b.value public_profile,
76 c.value public_title
77 FROM
78 usr_data a
79 LEFT JOIN
80 usr_pref b ON
81 (a.usr_id = b.usr_id AND
82 b.keyword = %s)
83 LEFT JOIN
84 usr_pref c ON
85 (a.usr_id = c.usr_id AND
86 c.keyword = %s)
87 WHERE ' . $ilDB->in('a.usr_id', $a_user_id, false, 'integer');
88
89 $userrow = $ilDB->queryF($sql, array('text', 'text'), array('public_profile', 'public_title'));
90
91 $names = array();
92
93 $data = array();
94 while ($row = $ilDB->fetchObject($userrow)) {
95 $pres = '';
96 $d = array("id" => (int) $row->usr_id, "title" => "", "lastname" => "", "firstname" => "", "img" => "", "link" => "",
97 "public_profile" => "");
98 $has_public_profile = in_array($row->public_profile, array("y", "g"));
99 if ($a_force_first_lastname || $has_public_profile) {
100 $title = "";
101 if ($row->public_title == "y" && $row->title) {
102 $title = $row->title . " ";
103 }
104 $d["title"] = $title;
105 if ($a_sortable) {
106 $pres = $row->lastname;
107 if (strlen($row->firstname)) {
108 $pres .= (', ' . $row->firstname . ' ');
109 }
110 } else {
111 $pres = $title;
112 if (strlen($row->firstname)) {
113 $pres .= $row->firstname . ' ';
114 }
115 $pres .= ($row->lastname . ' ');
116 }
117 $d["firstname"] = $row->firstname;
118 $d["lastname"] = $row->lastname;
119 }
120 $d["login"] = $row->login;
121 $d["public_profile"] = $has_public_profile;
122
123
124 if (!$a_omit_login) {
125 $pres .= "[" . $row->login . "]";
126 }
127
128 if ($a_profile_link && $has_public_profile) {
129 $ilCtrl->setParameterByClass(end($a_ctrl_path), "user_id", $row->usr_id);
130 if ($a_profile_back_link != "") {
131 $ilCtrl->setParameterByClass(
132 end($a_ctrl_path),
133 "back_url",
134 rawurlencode($a_profile_back_link)
135 );
136 }
137 $link = $ilCtrl->getLinkTargetByClass($a_ctrl_path, "getHTML");
138 $pres = '<a href="' . $link . '">' . $pres . '</a>';
139 $d["link"] = $link;
140 }
141
142 if ($a_user_image) {
143 $img = ilObjUser::_getPersonalPicturePath($row->usr_id, "xxsmall");
144 $pres = '<img class="ilUserXXSmall" src="' . $img . '" alt="' . $lng->txt("icon") .
145 " " . $lng->txt("user_picture") . '" /> ' . $pres;
146 $d["img"] = $img;
147 }
148
149 $names[$row->usr_id] = $pres;
150 $data[$row->usr_id] = $d;
151 }
152
153 foreach ($a_user_id as $id) {
154 if (!$names[$id]) {
155 $names[$id] = $lng->txt('usr_name_undisclosed');
156 }
157 }
158
159 if ($a_return_data_array) {
160 if ($return_as_array) {
161 return $data;
162 } else {
163 return current($data);
164 }
165 }
166 return $return_as_array ? $names : $names[$a_user_id[0]];
167 }
static _getPersonalPicturePath( $a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false, $html_export=false)
Get path to personal picture.
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
$img
Definition: imgupload.php:57
$lng
global $ilDB
$data
Definition: storeScorm.php:23

References $d, $data, $DIC, $ilDB, $img, $lng, and ilObjUser\_getPersonalPicturePath().

Referenced by ilSurveyAppraiseesTableGUI\__construct(), ilMDCopyrightUsageTableGUI\collectData(), ilSystemNotification\compose(), ilGroupAddToGroupActionGUI\confirmAddUser(), ilSurveyParticipantsGUI\confirmAdminAppraiseesCloseObject(), ilGroupAddToGroupActionGUI\confirmCreateGroupAndAddUser(), ilBadgeManagementGUI\confirmDeassignBadge(), ilExerciseManagementGUI\confirmDeassignMembersObject(), ilSurveyParticipantsGUI\confirmDeleteAppraiseesObject(), ilMailingListsGUI\confirmDeleteMembers(), ilSurveyParticipantsGUI\confirmDeleteRatersObject(), ilConsultationHoursGUI\confirmRejectBooking(), ilCourseParticipantsGroupsGUI\confirmRemove(), ilObjBlogGUI\confirmRemoveContributor(), ilExSubmissionTeamGUI\confirmRemoveTeamMemberObject(), ilSkillProfileGUI\confirmUserRemoval(), ilExSubmissionTeamGUI\createTeamObject(), ilExerciseManagementGUI\createTeamsFromGroupsObject(), ilContSkillAdminGUI\deassignCompetencesConfirm(), ilExerciseManagementGUI\executeCommand(), ilSharedResourceGUI\executeCommand(), ilBookingReservationsTableGUI\fillRow(), ilExAssignmentListTextTableGUI\fillRow(), ilWikiPagesTableGUI\fillRow(), ilWikiRecentChangesTableGUI\fillRow(), ilPageHistoryTableGUI\fillRow(), ilHistoryTableGUI\fillRow(), ilUserForTagTableGUI\fillRow(), ilExcDeliveredFilesTableGUI\fillRow(), ilWorkspaceShareTableGUI\fillRow(), ilCronManagerTableGUI\formatResultInfo(), ilCronManagerTableGUI\formatStatusInfo(), ilSkillProfile\getAssignedUsers(), ilAwarenessData\getData(), ILIAS\OnScreenChat\Repository\Subscriber\getDataByUserIds(), ilPublicUserProfileGUI\getEmbeddable(), ilContributorTableGUI\getItems(), ilExAssignmentPeerReviewTableGUI\getItems(), ilExAssignmentTeamTableGUI\getItems(), ilLMPageObjectGUI\getLinkXML(), ilLMPresentationLinker\getLinkXML(), ilPageLinker\getLinkXML(), ilLearningModuleNotification\getMailBody(), ilNoteGUI\getNoteListHTML(), ilAwarenessData\getOnlineUserData(), ilExSubmissionTeamGUI\getOverviewContent(), ilWikiPagesTableGUI\getPages(), ilAbstractUsersGalleryCollectionProvider\getPopulatedGroup(), ilDclBaseRecordModel\getStandardFieldHTML(), ilAppointmentPresentationGUI\getUserName(), ilMailUserHelper\getUsernameMapForIds(), ilInternalLinkGUI\getUserSearchResult(), ilBlogPosting\handleNews(), ilWorkspaceAccessTableGUI\importData(), ilObjSurveyGUI\infoScreen(), ilObjFileGUI\infoScreenForward(), ilLearningProgressBaseGUI\initEditUserForm(), ilSurveyParticipantsGUI\initExternalRaterForm(), ilCalendarCategoryGUI\initFormCategory(), ilExerciseManagementGUI\initGroupForm(), ilExPeerReviewGUI\initPeerReviewItemForm(), ilBookingPreferencesGUI\listBookingResults(), ilSurveyExecutionGUI\outSurveyPage(), ilExAssignmentListTextTableGUI\parse(), ilConsultationHourBookingTableGUI\parse(), ilMembershipCronNotifications\parseNewsItem(), ilBuddySystemRelationsTableGUI\populate(), ilBlogPostingGUI\postOutputProcessing(), ilWikiPageGUI\preview(), ilContSkillAdminGUI\publishAssignments(), ilNewsTimelineItemGUI\render(), ilExPeerReviewGUI\renderInfoWidget(), ilObjBlogGUI\renderList(), ilLikeGUI\renderModal(), ilObjBlogGUI\renderNavigationByAuthors(), ilPublicUserProfileGUI\renderTitle(), ilLMMailNotification\send(), ilBuddySystemNotification\send(), ilObjSurvey\send360ReminderToUser(), ilWikiUtil\sendNotification(), ilObjSurvey\sendNotificationMail(), ilNote\sendNotifications(), ilObjSurvey\sendRaterNotification(), ilMStShowUserGUI\setTitleAndIcon(), ilChatroomBanGUI\show(), ilPageObjectGUI\showEditLockInfo(), ilMailingListsGUI\showMembersList(), ilPageObjectGUI\showPage(), ilExAssignmentPeerReviewOverviewTableGUI\translateUserIds(), and ilPageObject\update().

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

◆ getPersonalStartingObject()

static ilUserUtil::getPersonalStartingObject ( )
static

Get ref id of personal starting object.

Returns
int

Definition at line 611 of file class.ilUserUtil.php.

612 {
613 global $DIC;
614
615 $ilUser = $DIC['ilUser'];
616
617 $ref_id = $ilUser->getPref("usr_starting_point_ref_id");
618 if (!$ref_id) {
619 $ref_id = self::getStartingObject();
620 }
621 return $ref_id;
622 }
static getStartingObject()
Get ref id of starting object.
$ilUser
Definition: imgupload.php:18

References $DIC, $ilUser, and getStartingObject().

Referenced by ilPersonalSettingsGUI\initGeneralSettingsForm().

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

◆ getPersonalStartingPoint()

static ilUserUtil::getPersonalStartingPoint ( )
static

Get current personal starting point.

Returns
int

Definition at line 553 of file class.ilUserUtil.php.

554 {
555 global $DIC;
556
557 $ilUser = $DIC['ilUser'];
558
559 $valid = array_keys(self::getPossibleStartingPoints());
560 $current = $ilUser->getPref("usr_starting_point");
561 if ($current == self::START_REPOSITORY_OBJ) {
562 return $current;
563 } elseif (!$current || !in_array($current, $valid)) {
564 return self::getStartingPoint();
565 }
566 return $current;
567 }
static getStartingPoint()
Get current starting point setting.
$valid

References $DIC, $ilUser, $valid, and getStartingPoint().

Referenced by ilPersonalSettingsGUI\initGeneralSettingsForm().

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

◆ getPossibleStartingPoints()

static ilUserUtil::getPossibleStartingPoints (   $a_force_all = false)
static

Get all valid starting points.

Returns
array

Definition at line 219 of file class.ilUserUtil.php.

220 {
221 global $DIC;
222
223 $ilSetting = $DIC['ilSetting'];
224 $lng = $DIC['lng'];
225
226 // for all conditions: see ilMainMenuGUI
227
228 $all = array();
229
230 $all[self::START_PD_OVERVIEW] = 'mm_dashboard';
231 $all[self::START_PD_SUBSCRIPTION] = 'my_courses_groups';
232
233 if (ilMyStaffAccess::getInstance()->hasCurrentUserAccessToMyStaff()) {
234 $all[self::START_PD_MYSTAFF] = 'my_staff';
235 }
236
237 if ($a_force_all || !$ilSetting->get("disable_personal_workspace")) {
238 $all[self::START_PD_WORKSPACE] = 'mm_personal_and_shared_r';
239 }
240
241 include_once('./Services/Calendar/classes/class.ilCalendarSettings.php');
243 if ($a_force_all || $settings->isEnabled()) {
244 $all[self::START_PD_CALENDAR] = 'calendar';
245 }
246
247 $all[self::START_REPOSITORY] = 'obj_root';
248
249 foreach ($all as $idx => $lang) {
250 $all[$idx] = $lng->txt($lang);
251 }
252
253 return $all;
254 }
static _getInstance()
get singleton instance
const START_PD_MYSTAFF
const START_REPOSITORY
const START_PD_WORKSPACE
const START_PD_CALENDAR
const START_PD_OVERVIEW
const START_PD_SUBSCRIPTION
$lang
Definition: xapiexit.php:8

References $DIC, $ilSetting, $lang, $lng, ilCalendarSettings\_getInstance(), START_PD_CALENDAR, START_PD_MYSTAFF, START_PD_OVERVIEW, START_PD_SUBSCRIPTION, START_PD_WORKSPACE, and START_REPOSITORY.

Referenced by ilUserRoleStartingPointTableGUI\getItems(), ilUserStartingPointGUI\getRoleStartingPointForm(), and ilPersonalSettingsGUI\initGeneralSettingsForm().

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

◆ getProfileLink()

static ilUserUtil::getProfileLink (   $a_usr_id)
static

Get link to personal profile Return empty string in case of not public profile.

Parameters
type$a_usr_id
Returns
string

Definition at line 198 of file class.ilUserUtil.php.

199 {
200 $public_profile = ilObjUser::_lookupPref($a_usr_id, 'public_profile');
201 if ($public_profile != 'y' and $public_profile != 'g') {
202 return '';
203 }
204
205 $GLOBALS['DIC']['ilCtrl']->setParameterByClass('ilpublicuserprofilegui', 'user', $a_usr_id);
206 return $GLOBALS['DIC']['ilCtrl']->getLinkTargetByClass('ilpublicuserprofilegui', 'getHTML');
207 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
static _lookupPref($a_usr_id, $a_keyword)

References $GLOBALS, and ilObjUser\_lookupPref().

Referenced by ilMDCopyrightUsageTableGUI\collectData().

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

◆ getStartingObject()

static ilUserUtil::getStartingObject ( )
static

Get ref id of starting object.

Returns
int

Definition at line 469 of file class.ilUserUtil.php.

470 {
471 global $DIC;
472
473 $ilSetting = $DIC['ilSetting'];
474
475 return $ilSetting->get("usr_starting_point_ref_id");
476 }

References $DIC, and $ilSetting.

Referenced by ilUserRoleStartingPointTableGUI\getItems(), getPersonalStartingObject(), and ilUserStartingPointGUI\getRoleStartingPointForm().

+ Here is the caller graph for this function:

◆ getStartingPoint()

static ilUserUtil::getStartingPoint ( )
static

Get current starting point setting.

Returns
int

Definition at line 298 of file class.ilUserUtil.php.

299 {
300 global $DIC;
301
302 $ilSetting = $DIC['ilSetting'];
303 $ilUser = $DIC['ilUser'];
304
305 $valid = array_keys(self::getPossibleStartingPoints());
306 $current = $ilSetting->get("usr_starting_point");
307 if ($current == self::START_REPOSITORY_OBJ) {
308 return $current;
309 } elseif (!$current || !in_array($current, $valid)) {
310 $current = self::START_PD_OVERVIEW;
311
312 // #10715 - if 1 is disabled overview will display the current default
313 if ($ilSetting->get('disable_my_offers') == 0 &&
314 $ilSetting->get('disable_my_memberships') == 0 &&
315 $ilSetting->get('personal_items_default_view') == 1) {
317 }
318
319 self::setStartingPoint($current);
320 }
321 if ($ilUser->getId() == ANONYMOUS_USER_ID ||
322 !$ilUser->getId()) { // #18531
323 $current = self::START_REPOSITORY;
324 }
325 return $current;
326 }
static setStartingPoint($a_value, $a_ref_id=null, $a_cal_view=[])
Set starting point setting.
const ANONYMOUS_USER_ID
Definition: constants.php:25

References $DIC, $ilSetting, $ilUser, $valid, ANONYMOUS_USER_ID, setStartingPoint(), START_PD_OVERVIEW, START_PD_SUBSCRIPTION, and START_REPOSITORY.

Referenced by ilUserRoleStartingPointTableGUI\getItems(), getPersonalStartingPoint(), and ilUserStartingPointGUI\getRoleStartingPointForm().

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

◆ hasPersonalStartingPoint()

static ilUserUtil::hasPersonalStartingPoint ( )
static

Can starting point be personalized?

Returns
bool

Definition at line 525 of file class.ilUserUtil.php.

526 {
527 global $DIC;
528
529 $ilSetting = $DIC['ilSetting'];
530
531 return $ilSetting->get("usr_starting_point_personal");
532 }

References $DIC, and $ilSetting.

Referenced by ilPersonalSettingsGUI\checkPersonalStartingPoint(), ilUserRoleStartingPointTableGUI\getItems(), ilUserStartingPointGUI\getUserStartingPointForm(), ilPersonalSettingsGUI\initGeneralSettingsForm(), and ilPersonalSettingsGUI\saveGeneralSettings().

+ Here is the caller graph for this function:

◆ hasPersonalStartPointPref()

static ilUserUtil::hasPersonalStartPointPref ( )
static

Did user set any personal starting point (yet)?

Returns
bool

Definition at line 539 of file class.ilUserUtil.php.

540 {
541 global $DIC;
542
543 $ilUser = $DIC['ilUser'];
544
545 return (bool) $ilUser->getPref("usr_starting_point");
546 }

References $DIC, and $ilUser.

Referenced by ilPersonalSettingsGUI\initGeneralSettingsForm().

+ Here is the caller graph for this function:

◆ hasPublicProfile()

static ilUserUtil::hasPublicProfile (   $a_user_id)
static

Has public profile.

Parameters

return

Definition at line 175 of file class.ilUserUtil.php.

176 {
177 global $DIC;
178
179 $ilDB = $DIC['ilDB'];
180
181 $set = $ilDB->query(
182 "SELECT value FROM usr_pref " .
183 " WHERE usr_id = " . $ilDB->quote($a_user_id, "integer") .
184 " and keyword = " . $ilDB->quote("public_profile", "text")
185 );
186 $rec = $ilDB->fetchAssoc($set);
187
188 return in_array($rec["value"], array("y", "g"));
189 }

References $DIC, and $ilDB.

Referenced by ilLMPageObjectGUI\getLinkXML(), ilLMPresentationLinker\getLinkXML(), and ilPageLinker\getLinkXML().

+ Here is the caller graph for this function:

◆ setPersonalStartingPoint()

static ilUserUtil::setPersonalStartingPoint (   $a_value,
  $a_ref_id = null 
)
static

Set personal starting point setting.

Parameters
int$a_value
int$a_ref_id
Returns
boolean

Definition at line 576 of file class.ilUserUtil.php.

577 {
578 global $DIC;
579
580 $ilUser = $DIC['ilUser'];
581 $tree = $DIC['tree'];
582
583 if (!$a_value) {
584 $ilUser->setPref("usr_starting_point", null);
585 $ilUser->setPref("usr_starting_point_ref_id", null);
586 return;
587 }
588
589 if ($a_value == self::START_REPOSITORY_OBJ) {
590 $a_ref_id = (int) $a_ref_id;
591 if (ilObject::_lookupObjId($a_ref_id) &&
592 !$tree->isDeleted($a_ref_id)) {
593 $ilUser->setPref("usr_starting_point", $a_value);
594 $ilUser->setPref("usr_starting_point_ref_id", $a_ref_id);
595 return true;
596 }
597 }
598 $valid = array_keys(self::getPossibleStartingPoints());
599 if (in_array($a_value, $valid)) {
600 $ilUser->setPref("usr_starting_point", $a_value);
601 return true;
602 }
603 return false;
604 }
static _lookupObjId($a_id)

References $DIC, $ilUser, $valid, and ilObject\_lookupObjId().

Referenced by ilPersonalSettingsGUI\saveGeneralSettings().

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

◆ setStartingPoint()

static ilUserUtil::setStartingPoint (   $a_value,
  $a_ref_id = null,
  $a_cal_view = [] 
)
static

Set starting point setting.

Parameters
int$a_value
int$a_ref_id
array$a_cal_view
Returns
boolean

Definition at line 264 of file class.ilUserUtil.php.

265 {
266 global $DIC;
267
268 $ilSetting = $DIC['ilSetting'];
269 $tree = $DIC['tree'];
270
271 if ($a_value == self::START_REPOSITORY_OBJ) {
272 $a_ref_id = (int) $a_ref_id;
273 if (ilObject::_lookupObjId($a_ref_id) &&
274 !$tree->isDeleted($a_ref_id)) {
275 $ilSetting->set("usr_starting_point", $a_value);
276 $ilSetting->set("usr_starting_point_ref_id", $a_ref_id);
277 return true;
278 }
279 }
280 $valid = array_keys(self::getPossibleStartingPoints());
281 if (in_array($a_value, $valid)) {
282 $ilSetting->set("usr_starting_point", $a_value);
283 if ($a_value == self::START_PD_CALENDAR) {
284 foreach ($a_cal_view as $key => $value) {
285 $ilSetting->set($key, $value);
286 }
287 }
288 return true;
289 }
290 return false;
291 }

References $DIC, $ilSetting, $valid, and ilObject\_lookupObjId().

Referenced by getStartingPoint(), and ilUserStartingPointGUI\saveStartingPoint().

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

◆ togglePersonalStartingPoint()

static ilUserUtil::togglePersonalStartingPoint (   $a_value)
static

Toggle personal starting point setting.

Parameters
bool$a_value

Definition at line 511 of file class.ilUserUtil.php.

512 {
513 global $DIC;
514
515 $ilSetting = $DIC['ilSetting'];
516
517 $ilSetting->set("usr_starting_point_personal", (bool) $a_value);
518 }

References $DIC, and $ilSetting.

Referenced by ilUserStartingPointGUI\saveUserStartingPoint().

+ Here is the caller graph for this function:

Field Documentation

◆ START_PD_CALENDAR

const ilUserUtil::START_PD_CALENDAR = 10

◆ START_PD_CONTACTS

const ilUserUtil::START_PD_CONTACTS = 12

Definition at line 26 of file class.ilUserUtil.php.

◆ START_PD_LP

const ilUserUtil::START_PD_LP = 9

Definition at line 23 of file class.ilUserUtil.php.

◆ START_PD_MAIL

const ilUserUtil::START_PD_MAIL = 11

Definition at line 25 of file class.ilUserUtil.php.

◆ START_PD_MYSTAFF

const ilUserUtil::START_PD_MYSTAFF = 17

Definition at line 31 of file class.ilUserUtil.php.

Referenced by getPossibleStartingPoints().

◆ START_PD_NEWS

const ilUserUtil::START_PD_NEWS = 5

Definition at line 19 of file class.ilUserUtil.php.

◆ START_PD_NOTES

const ilUserUtil::START_PD_NOTES = 4

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

◆ START_PD_OVERVIEW

const ilUserUtil::START_PD_OVERVIEW = 1

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

Referenced by getPossibleStartingPoints(), and getStartingPoint().

◆ START_PD_PORTFOLIO

const ilUserUtil::START_PD_PORTFOLIO = 7

Definition at line 21 of file class.ilUserUtil.php.

◆ START_PD_PROFILE

const ilUserUtil::START_PD_PROFILE = 13

Definition at line 27 of file class.ilUserUtil.php.

◆ START_PD_SETTINGS

const ilUserUtil::START_PD_SETTINGS = 14

Definition at line 28 of file class.ilUserUtil.php.

◆ START_PD_SKILLS

const ilUserUtil::START_PD_SKILLS = 8

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

◆ START_PD_SUBSCRIPTION

const ilUserUtil::START_PD_SUBSCRIPTION = 2

Definition at line 17 of file class.ilUserUtil.php.

Referenced by getPossibleStartingPoints(), and getStartingPoint().

◆ START_PD_WORKSPACE

const ilUserUtil::START_PD_WORKSPACE = 6

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

Referenced by getPossibleStartingPoints().

◆ START_REPOSITORY

const ilUserUtil::START_REPOSITORY = 15

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

Referenced by getPossibleStartingPoints(), and getStartingPoint().

◆ START_REPOSITORY_OBJ


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