68 $this->
tabs = $DIC->tabs();
69 $this->
user = $DIC->user();
70 $this->
lng = $DIC->language();
71 $this->setting = $DIC->settings();
72 $this->ui_factory = $DIC[
'ui.factory'];
73 $this->ui_renderer = $DIC[
'ui.renderer'];
74 $this->tpl = $DIC->ui()->mainTemplate();
75 $this->
ctrl = $DIC->ctrl();
76 $this->auth_session = $DIC[
'ilAuthSession'];
77 $this->errorHandler = $DIC[
'ilErr'];
78 $this->eventHandler = $DIC[
'ilAppEventHandler'];
79 $this->request = $DIC->http()->request();
81 if ($termsOfServiceEvaluation === null) {
82 $termsOfServiceEvaluation = $DIC[
'tos.document.evaluator'];
85 if ($termsOfServiceHelper === null) {
94 $this->
lng->loadLanguageModule(
"jsmath");
95 $this->
lng->loadLanguageModule(
"pd");
96 $this->upload_error =
"";
97 $this->password_error =
"";
98 $this->
lng->loadLanguageModule(
"user");
99 $this->
ctrl->saveParameter($this,
"prompted");
106 $this->profile_request = new \ILIAS\User\ProfileGUIRequest(
117 $ilCtrl = $DIC[
'ilCtrl'];
119 $ilTabs = $DIC[
'ilTabs'];
121 $next_class = $this->
ctrl->getNextClass();
123 switch ($next_class) {
124 case "ilpublicuserprofilegui":
126 $pub_profile_gui->
setBackUrl($ilCtrl->getLinkTarget($this,
"showPersonalData"));
127 $ilCtrl->forwardCommand($pub_profile_gui);
131 case "iluserprivacysettingsgui":
134 $ilTabs->activateTab(
"visibility_settings");
137 $ilCtrl->forwardCommand($gui);
142 $cmd = $this->
ctrl->getCmd(
"showPersonalData");
151 return $this->user_settings_config->isVisibleAndChangeable($setting);
156 return $this->user_settings_config->isVisible($setting);
161 return $this->user_settings_config->isChangeable($setting);
173 if (!$this->
form->hasFileUpload(
'userfile')
174 && $this->profile_request->getUserFileCapture() ===
'') {
175 if ($this->
form->getItemByPostVar(
"userfile")->getDeletionFlag()) {
182 $image_dir = $webspace_dir .
"/usr_images";
184 $store_file =
"usr_" .
$ilUser->getID() .
"." .
"jpg";
187 $ilUser->setPref(
"profile_image", $store_file);
190 if ($this->
form->hasFileUpload(
"userfile")) {
191 $file_info = $this->
form->getFileUpload(
'userfile');
192 $tmp_path = $file_info[
'tmp_name'];
193 if (!$file_info[
'is_upload']) {
195 rename($tmp_path, $new_path);
196 $tmp_path = $new_path;
202 $capture = $this->profile_request->getUserFileCapture();
203 if ($capture === null) {
207 $uploaded_file = $image_dir . DIRECTORY_SEPARATOR .
"upload_" .
$ilUser->getId() .
".png";
209 [
'data:image/png;base64,',
' '],
214 $success = file_put_contents($uploaded_file,
$data);
216 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"upload_error_file_not_found",
true));
217 $this->
ctrl->redirect($this,
"showProfile");
221 chmod($uploaded_file, 0770);
231 $show_file =
"$image_dir/usr_" .
$ilUser->getId() .
".jpg";
232 $thumb_file =
"$image_dir/usr_" .
$ilUser->getId() .
"_small.jpg";
233 $xthumb_file =
"$image_dir/usr_" .
$ilUser->getId() .
"_xsmall.jpg";
234 $xxthumb_file =
"$image_dir/usr_" .
$ilUser->getId() .
"_xxsmall.jpg";
243 $uploaded_file .
"[0] -geometry 200x200^ -gravity center -extent 200x200 -quality 100 JPEG:" . $show_file
246 $uploaded_file .
"[0] -geometry 100x100^ -gravity center -extent 100x100 -quality 100 JPEG:" . $thumb_file
249 $uploaded_file .
"[0] -geometry 75x75^ -gravity center -extent 75x75 -quality 100 JPEG:" . $xthumb_file
252 $uploaded_file .
"[0] -geometry 30x30^ -gravity center -extent 30x30 -quality 100 JPEG:" . $xxthumb_file
282 $this->
tabs->clearTargets();
283 $this->
tabs->clearSubTabs();
285 $tpl = new \ilTemplate(
'tpl.view_terms_of_service.html',
true,
true,
'Services/Init');
287 $this->tpl->setTitle($this->
lng->txt(
'usr_agreement'));
290 if (!$this->
user->isAnonymous() && $this->
user->getId() > 0 && $this->
user->getAgreeDate()) {
291 $helper = new \ilTermsOfServiceHelper();
293 $entity = $helper->getCurrentAcceptanceForUser($this->
user);
294 if ($entity->getId()) {
295 $noAgreement =
false;
296 $tpl->
setVariable(
'TERMS_OF_SERVICE_CONTENT', $entity->getText());
300 if ($handleDocument) {
301 $noAgreement =
false;
302 $document = $this->termsOfServiceEvaluation->document();
303 $tpl->
setVariable(
'TERMS_OF_SERVICE_CONTENT', $document->content());
309 'TERMS_OF_SERVICE_CONTENT',
311 $this->
lng->txt(
'no_agreement_description'),
319 $this->tpl->setContent($tpl->
get());
320 $this->tpl->setPermanentLink(
'usr', null,
'agreement');
321 $this->tpl->printToStdout();
327 !$this->
user->getPref(
'consent_withdrawal_requested') ||
328 !$this->termsOfServiceHelper->isIncludedUser($this->
user)
330 $this->errorHandler->raiseError($this->
lng->txt(
'permission_denied'), $this->errorHandler->MESSAGE);
333 $this->
tabs->clearTargets();
334 $this->
tabs->clearSubTabs();
335 $this->tpl->setTitle($this->
lng->txt(
'refuse_tos_acceptance'));
338 $content = $tosWithdrawalGui->getConsentWithdrawalConfirmation($this);
340 $this->tpl->setContent($content);
341 $this->tpl->setPermanentLink(
'usr', null,
'agreement');
342 $this->tpl->printToStdout();
347 if (!$this->termsOfServiceHelper->isIncludedUser($this->user)) {
348 $this->errorHandler->raiseError($this->
lng->txt(
'permission_denied'), $this->errorHandler->MESSAGE);
351 $this->
user->deletePref(
'consent_withdrawal_requested');
356 $this->
ctrl->redirectToURL($target);
365 !$this->
user->getPref(
'consent_withdrawal_requested') ||
366 !$this->termsOfServiceHelper->isIncludedUser($this->
user)
368 $this->errorHandler->raiseError($this->
lng->txt(
'permission_denied'), $this->errorHandler->MESSAGE);
370 $this->termsOfServiceHelper->resetAcceptance($this->
user);
373 if ($this->setting->get(
'auth_mode')) {
374 $defaultAuth = $this->setting->get(
'auth_mode');
383 } elseif ($this->setting->get(
'tos_withdrawal_usr_deletion',
'0') !==
'0') {
388 $this->eventHandler->raise(
389 'Services/TermsOfService',
390 'ilTermsOfServiceEventWithdrawn',
391 [
'event' => $domainEvent]
395 $this->auth_session->logout();
397 $this->
ctrl->redirectToURL(
'login.php?tos_withdrawal_type=' . $withdrawalType .
'&cmd=force_login');
407 $ilCtrl = $DIC[
'ilCtrl'];
415 $this->
lng->loadLanguageModule(
"maps");
427 if ($latitude == null && $longitude == null && $zoom == 0) {
429 $latitude = (float) $def[
"latitude"];
430 $longitude = (float) $def[
"longitude"];
431 $zoom = (
int) $def[
"zoom"];
436 $street = $this->
lng->txt(
"street");
440 $city = $this->
lng->txt(
"city");
444 $country = $this->
lng->txt(
"country");
449 $this->
lng->txt(
"location"),
453 $loc_prop->setLongitude($longitude);
454 $loc_prop->setZoom($zoom);
455 $loc_prop->setAddress($street .
"," . $city .
"," . $country);
465 $ilTabs = $DIC[
'ilTabs'];
466 $ilHelp = $DIC[
'ilHelp'];
468 $ilHelp->setScreenIdComponent(
"user");
473 $this->
lng->txt(
"user_profile_data"),
474 $this->
ctrl->getLinkTarget($this,
"showPersonalData")
480 $this->
lng->txt(
"user_publish_options"),
481 $this->
ctrl->getLinkTarget($this,
"showPublicProfile")
485 $txt_visibility = $this->checklist_status->anyVisibilitySettings()
486 ? $this->
lng->txt(
"user_visibility_settings")
487 : $this->
lng->txt(
"preview");
489 "visibility_settings",
491 $this->
ctrl->getLinkTargetByClass(
"ilUserPrivacySettingsGUI",
"")
497 $this->
lng->txt(
"export") .
"/" . $this->
lng->txt(
"import"),
498 $this->
ctrl->getLinkTarget($this,
"showExportImport")
506 if ($this->
userSettingVisible(
"matriculation") or count($this->user_defined_fields->getVisibleDefinitions())
507 or $d_set->get(
"user_profile") ==
"1") {
519 $user_defined_data =
$ilUser->getUserDefinedData();
520 foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
522 $this->tpl->setCurrentBlock(
"field_text");
523 $this->tpl->setVariable(
527 if (!$definition[
'changeable']) {
528 $this->tpl->setVariable(
"DISABLED_FIELD",
'disabled=\"disabled\"');
530 $this->tpl->setVariable(
"FIELD_NAME",
'udf[' . $definition[
'field_id'] .
']');
532 if ($definition[
'changeable']) {
533 $name =
'udf[' . $definition[
'field_id'] .
']';
539 $this->tpl->setCurrentBlock(
"field_select");
540 $this->tpl->setVariable(
543 $user_defined_data[$field_id],
545 $this->user_defined_fields->fieldValuesToSelectArray(
546 $definition[
'field_values']
557 $this->tpl->parseCurrentBlock();
558 $this->tpl->setCurrentBlock(
"user_defined");
560 if ($definition[
'required']) {
561 $name = $definition[
'field_name'] .
"<span class=\"asterisk\">*</span>";
563 $name = $definition[
'field_name'];
565 $this->tpl->setVariable(
"TXT_FIELD_NAME",
$name);
566 $this->tpl->parseCurrentBlock();
573 $this->tpl->setTitle($this->
lng->txt(
'personal_profile'));
583 bool $a_no_init =
false,
584 bool $a_migration_started =
false 590 $ilTabs = $DIC[
'ilTabs'];
593 $ilTabs->activateTab(
"personal_data");
594 $ctrl = $DIC->ctrl();
597 if ($this->profile_request->getPrompted() == 1) {
598 $it = $prompt_service->data()->getSettings()->getPromptText(
$ilUser->getLanguage());
601 $it = $prompt_service->data()->getSettings()->getInfoText(
$ilUser->getLanguage());
603 if (trim($it) !==
"") {
604 $pub_prof = in_array(
$ilUser->prefs[
"public_profile"] ??
"", array(
"y",
"n",
"g"))
605 ?
$ilUser->prefs[
"public_profile"]
607 $box = $DIC->ui()->factory()->messageBox()->info($it);
608 if ($pub_prof ===
"n") {
609 $box = $box->withLinks(
610 [$DIC->ui()->factory()->link()->standard(
611 $lng->
txt(
"user_make_profile_public"),
616 $it = $DIC->ui()->renderer()->render($box);
625 if (
$ilUser->getProfileIncomplete()) {
626 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"profile_incomplete"));
631 if ($this->email_change_confirmation_modal !== null) {
632 $modal = $this->ui_renderer->render($this->email_change_confirmation_modal);
635 $this->tpl->setContent($it . $this->
form->getHTML() . $modal);
636 $this->tpl->printToStdout();
648 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
649 $this->
form->setId(self::PERSONAL_DATA_FORM_ID);
652 $user_defined_data =
$ilUser->getUserDefinedData();
655 foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
656 $value = $user_defined_data[
"f_" . $field_id] ??
"";
660 $definition[
'changeable'] ??
false,
664 $input[
'udf_' . $definition[
'field_id']] = $fprop;
670 $up->skipField(
"password");
671 $up->skipGroup(
"settings");
672 $up->skipGroup(
"preferences");
674 $up->setAjaxCallback(
675 $this->
ctrl->getLinkTargetByClass(
'ilPublicUserProfileGUI',
'doProfileAutoComplete',
'',
true)
679 $up->addStandardFieldsToForm($this->
form,
$ilUser, $input);
683 $this->
form->addCommandButton(
"savePersonalData", $lng->
txt(
"user_save_continue"));
689 if (!$this->
form->checkInput()
694 $this->
form->setValuesByPost();
703 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
705 $this->
ctrl->redirect($this,
"showPublicProfile");
710 $email_input = $this->
form->getItemByPostVar(
'usr_email');
711 if ($email_input !== null && !$email_input->getDisabled()
712 && $this->
form->getInput(
'usr_email') !== $this->
user->getEmail()) {
721 $current_email = $this->
user->getEmail();
723 $this->
user->getProfileIncomplete()
724 && $this->setting->get(
'require_email') ===
'1' 725 && ($current_email === null || $current_email ===
'')
735 $form_id =
'form_' . self::PERSONAL_DATA_FORM_ID;
736 $modal = $this->ui_factory->modal()->interruptive(
737 $this->
lng->txt(
'confirm'),
738 $this->
lng->txt(
'confirm_logout_for_email_change'),
740 )->withActionButtonLabel(
'change');
741 $this->email_change_confirmation_modal = $modal->withOnLoad($modal->getShowSignal())
743 static function (
$id) use ($form_id) {
744 return "var button = {$id}.querySelector('input[name=\"cmd[change]\"]'); " 745 .
"button.addEventListener('click', (e) => {e.preventDefault();" 746 .
"document.getElementById('{$form_id}').submit();});";
750 $this->
form->setFormAction($this->
ctrl->getFormActionByClass(self::class,
'goToEmailConfirmation'));
756 $login = $this->
form->getInput(
'username');
757 if ((
int) $this->setting->get(
'allow_change_loginname')
758 && $login !== $this->
user->getLogin()) {
767 $login = $this->
form->getInput(
'username');
769 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
770 $this->
form->getItemByPostVar(
'username')->setAlert($this->
lng->txt(
'login_invalid'));
775 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
776 $this->
form->getItemByPostVar(
'username')->setAlert($this->
lng->txt(
'loginname_already_exists'));
780 $this->
user->setLogin($login);
783 $this->
user->updateLogin($this->
user->getLogin());
786 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
787 $this->
form->getItemByPostVar(
'username')->setAlert($e->getMessage());
795 if (!$this->
form->checkInput()
797 $this->
form->setValuesByPost();
804 $this->auth_session->logout();
806 $token = $this->change_mail_token_repo->getNewTokenForUser($this->
user, $this->
form->getInput(
'usr_email'));
807 $this->
ctrl->redirectToURL(
'login.php?cmd=force_login&target=usr_' . self::CHANGE_EMAIL_CMD .
$token);
814 "firstname" =>
"FirstName",
815 "lastname" =>
"LastName",
817 "sel_country" =>
"SelectedCountry",
818 "phone_office" =>
"PhoneOffice",
819 "phone_home" =>
"PhoneHome",
820 "phone_mobile" =>
"PhoneMobile",
821 "referral_comment" =>
"Comment",
822 "interests_general" =>
"GeneralInterests",
823 "interests_help_offered" =>
"OfferingHelp",
824 "interests_help_looking" =>
"LookingForHelp" 827 foreach (array_keys($up->getStandardFields()) as
$f) {
829 $item = $this->
form->getItemByPostVar(
"usr_" . $f);
830 if (!$item || $item->getDisabled()) {
834 $value = $this->
form->getInput(
"usr_" . $f);
838 $this->
user->setEmail($value);
843 $value = $item->getDate();
844 $this->
user->setBirthday($value
849 $this->
user->setSecondEmail($value);
852 $m = $map[
$f] ?? ucfirst($f);
853 $this->
user->{
"set" . $m}($value);
857 $this->
user->setFullname();
866 $this->
user->setLatitude(is_numeric($lat) ? $lat : null);
867 $this->
user->setLongitude(is_numeric($long) ? $long : null);
868 $this->
user->setLocationZoom(is_numeric($zoom) ? $zoom : null);
872 $defs = $this->user_defined_fields->getVisibleDefinitions();
874 foreach ($defs as $definition) {
875 $f =
"udf_" . $definition[
'field_id'];
876 $item = $this->
form->getItemByPostVar(
$f);
877 if ($item && !$item->getDisabled()) {
878 $udf[$definition[
'field_id']] = $this->
form->getInput(
$f);
881 $this->
user->setUserDefinedData($udf);
886 $this->
user->setProfileIncomplete(
false);
889 $this->
user->setTitle($this->
user->getFullname());
890 $this->
user->setDescription($this->
user->getEmail());
892 $this->
user->update();
897 $token = $this->profile_request->getToken();
898 $new_email = $this->change_mail_token_repo->getNewEmailForUser($this->
user,
$token);
900 if ($new_email !==
'') {
901 $this->
user->setEmail($new_email);
902 $this->
user->update();
903 $this->change_mail_token_repo->deleteEntryByToken(
$token);
904 $this->tpl->setOnScreenMessage(
906 $this->
lng->txt(
'saved_successfully')
912 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'email_could_not_be_changed'));
929 $this->tpl->setContent($this->
form->getHTML());
930 $this->tpl->printToStdout();
959 $this->
form->setTitle(
$lng->
txt(
"user_publish_options"));
960 $this->
form->setDescription(
$lng->
txt(
"user_public_profile_info"));
961 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
965 if (!$portfolio_id) {
968 $info = $this->
lng->txt(
"user_activate_public_profile_info");
970 $pub_prof = $profile_mode->getMode();
971 $radg->setValue($pub_prof);
973 $radg->addOption($op1);
975 $radg->addOption($op2);
976 if (
$ilSetting->get(
'enable_global_profiles')) {
978 $radg->addOption($op3);
980 $this->
form->addItem($radg);
985 $prtf =
"<br />" .
$lng->
txt(
"user_profile_portfolio");
986 $prtf .=
"<br /><a href=\"ilias.php?baseClass=ilDashboardGUI&cmd=jumpToPortfolio\">» " .
987 $lng->
txt(
"user_portfolios") .
"</a>";
993 $prtf =
$lng->
txt(
"user_profile_portfolio_selected");
994 $prtf .=
"<br /><a href=\"ilias.php?baseClass=ilDashboardGUI&cmd=jumpToPortfolio&prt_id=" . $portfolio_id .
"\">» " .
995 $lng->
txt(
"portfolio") .
"</a>";
999 $this->
form->addItem($info);
1009 $this->
form->setForceTopButtons(
true);
1010 $this->
form->addCommandButton(
"savePublicProfile",
$lng->
txt(
"user_save_continue"));
1016 ?
object $parent = null,
1017 bool $anonymized =
false,
1018 string $key_suffix =
"" 1024 $birthday =
$ilUser->getBirthday();
1028 $gender =
$ilUser->getGender();
1030 $gender = $this->
lng->txt(
"gender_" . $gender);
1033 $txt_sel_country =
"";
1034 if (
$ilUser->getSelectedCountry() !=
"") {
1035 $this->
lng->loadLanguageModule(
"meta");
1036 $txt_sel_country = $this->
lng->txt(
"meta_c_" .
$ilUser->getSelectedCountry());
1042 $pic =
"<img src=\"" . $pic .
"\" />";
1047 "title" =>
$ilUser->getUTitle(),
1048 "birthday" => $birthday,
1049 "gender" => $gender,
1051 "interests_general" =>
$ilUser->getGeneralInterestsAsText(),
1052 "interests_help_offered" =>
$ilUser->getOfferingHelpAsText(),
1053 "interests_help_looking" =>
$ilUser->getLookingForHelpAsText(),
1054 "org_units" =>
$ilUser->getOrgUnitsRepresentation(),
1055 "institution" =>
$ilUser->getInstitution(),
1056 "department" =>
$ilUser->getDepartment(),
1057 "street" =>
$ilUser->getStreet(),
1058 "zipcode" =>
$ilUser->getZipcode(),
1060 "country" =>
$ilUser->getCountry(),
1061 "sel_country" => $txt_sel_country,
1062 "phone_office" =>
$ilUser->getPhoneOffice(),
1063 "phone_home" =>
$ilUser->getPhoneHome(),
1064 "phone_mobile" =>
$ilUser->getPhoneMobile(),
1066 "email" =>
$ilUser->getEmail(),
1067 "second_email" =>
$ilUser->getSecondEmail(),
1068 "hobby" =>
$ilUser->getHobby(),
1069 "matriculation" =>
$ilUser->getMatriculation()
1078 foreach ($val_array as
$key => $value) {
1079 if (in_array($value, [
"",
"-"]) && !$anonymized) {
1090 $caption =
"personal_picture";
1094 $caption =
"person_title";
1101 if (isset($prefs[
"public_" .
$key]) && $prefs[
"public_" .
$key] ==
"y") {
1105 $cb->setOptionTitle((
string) $value);
1110 $parent->addSubItem($cb);
1116 $user_defined_data = array();
1118 $user_defined_data =
$ilUser->getUserDefinedData();
1120 foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
1122 $cb =
new ilCheckboxInputGUI($definition[
"field_name"],
"chk_udf_" . $definition[
"field_id"] . $key_suffix);
1123 $cb->setOptionTitle($user_defined_data[
"f_" . $definition[
"field_id"]] ??
"");
1124 $public_udf = (string) ($prefs[
"public_udf_" . $definition[
"field_id"]] ??
'');
1125 if ($public_udf ===
'y') {
1126 $cb->setChecked(
true);
1132 $parent->addSubItem($cb);
1138 if ($handler->isActive()) {
1139 $badge_options = array();
1143 if ($ass->getPosition()) {
1144 $badge =
new ilBadge($ass->getBadgeId());
1145 $badge_options[] = $badge->getTitle();
1149 if (count($badge_options) > 1) {
1152 $badge_order->setValue(array_shift($badge_options));
1153 $badge_order->setMulti(
true,
true,
false);
1158 $parent->addSubItem($badge_order);
1170 $parent->addSubItem($ne);
1180 $ilCtrl = $DIC[
'ilCtrl'];
1185 if ($this->
form->checkInput()) {
1187 if ($this->
form->getInput(
"public_profile") !=
"") {
1188 $ilUser->setPref(
"public_profile", $this->
form->getInput(
"public_profile"));
1192 $val_array = array(
"title",
"birthday",
"gender",
"org_units",
"institution",
"department",
"upload",
1193 "street",
"zipcode",
"city",
"country",
"sel_country",
"phone_office",
"phone_home",
"phone_mobile",
1194 "fax",
"email",
"second_email",
"hobby",
"matriculation",
"location",
1195 "interests_general",
"interests_help_offered",
"interests_help_looking");
1199 foreach ($val_array as
$key => $value) {
1200 if ($checked_values[
"chk_" . $value] ??
false) {
1201 $ilUser->setPref(
"public_" . $value,
"y");
1203 $ilUser->setPref(
"public_" . $value,
"n");
1207 foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
1208 if ($checked_values[
"chk_udf_" . $definition[
"field_id"]] ??
false) {
1209 $ilUser->setPref(
"public_udf_" . $definition[
"field_id"],
"y");
1211 $ilUser->setPref(
"public_udf_" . $definition[
"field_id"],
"n");
1217 switch ($this->
form->getInput(
"public_profile")) {
1227 if ($handler->isActive()) {
1228 $badgePositions = [];
1229 $bpos = $this->
form->getInput(
"bpos" . $key_suffix);
1230 if (isset($bpos) && is_array($bpos)) {
1231 $badgePositions = $bpos;
1234 if (count($badgePositions) > 0) {
1242 $this->tpl->setOnScreenMessage(
'success',
$lng->
txt(
"msg_obj_modified"),
true);
1251 $ilCtrl->redirectByClass(
"iluserprivacysettingsgui",
"");
1254 $this->
form->setValuesByPost();
1255 $tpl->showPublicProfile(
true);
1261 switch ($this->
form->getInput(
"public_profile")) {
1270 $checked_values = [];
1271 $post = $this->request->getParsedBody();
1272 foreach (
$post as $k => $v) {
1273 if (strpos($k,
"chk_") !== 0) {
1276 if (substr($k, -2) === $key_suffix) {
1277 $k = str_replace([
"-1",
"-2"],
"", $k);
1279 $checked_values[$k] = $v;
1281 foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
1282 if (isset(
$post[
"chk_udf_" . $definition[
"field_id"] . $key_suffix])) {
1283 $checked_values[
"chk_udf_" . $definition[
"field_id"]] =
"1";
1286 return $checked_values;
1293 $ilToolbar = $DIC[
'ilToolbar'];
1294 $ilCtrl = $DIC[
'ilCtrl'];
1296 $ilTabs = $DIC[
'ilTabs'];
1299 $ilTabs->activateTab(
"export");
1303 $button->setCaption(
"pd_export_profile");
1304 $button->setUrl($ilCtrl->getLinkTarget($this,
"exportPersonalData"));
1305 $ilToolbar->addStickyItem($button);
1307 $exp_file =
$ilUser->getPersonalDataExportFile();
1308 if ($exp_file !=
"") {
1309 $ilToolbar->addSeparator();
1310 $ilToolbar->addButton(
1311 $this->
lng->txt(
"pd_download_last_export_file"),
1312 $ilCtrl->getLinkTarget($this,
"downloadPersonalData")
1316 $ilToolbar->addSeparator();
1317 $ilToolbar->addButton(
1318 $this->
lng->txt(
"pd_import_personal_data"),
1319 $ilCtrl->getLinkTarget($this,
"importPersonalDataSelection")
1329 $ilCtrl = $DIC[
'ilCtrl'];
1332 $ilUser->exportPersonalData();
1333 $ilUser->sendPersonalDataFile();
1334 $ilCtrl->redirect($this,
"showExportImport");
1346 $ilUser->sendPersonalDataFile();
1354 $ilTabs = $DIC[
'ilTabs'];
1356 $ilTabs->activateTab(
"export");
1370 $ilCtrl = $DIC[
'ilCtrl'];
1377 $fi->setSuffixes(array(
"zip"));
1378 $this->
form->addItem($fi);
1382 $this->
form->addItem($cb);
1386 $this->
form->addItem($cb);
1390 $this->
form->addItem($cb);
1394 $this->
form->addItem($cb);
1396 $this->
form->addCommandButton(
"importPersonalData",
$lng->
txt(
"import"));
1397 $this->
form->addCommandButton(
"showExportImport",
$lng->
txt(
"cancel"));
1399 $this->
form->setTitle(
$lng->
txt(
"pd_import_personal_data"));
1400 $this->
form->setFormAction($ilCtrl->getFormAction($this));
1408 $ilCtrl = $DIC[
'ilCtrl'];
1410 $ilTabs = $DIC[
'ilTabs'];
1413 if ($this->
form->checkInput()) {
1416 (
int) $this->
form->getInput(
"profile_data"),
1417 (
int) $this->
form->getInput(
"settings"),
1418 (
int) $this->
form->getInput(
"notes"),
1419 (
int) $this->
form->getInput(
"calendar")
1421 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
1422 $ilCtrl->redirect($this,
"");
1424 $ilTabs->activateTab(
"export");
1426 $this->
form->setValuesByPost();
1440 $capture = $this->profile_request->getUserFileCapture();
1442 if ($capture !==
'') {
1443 $this->
form->getItemByPostVar(
'userfile')->setImage($capture);
1445 $hidden_user_picture_carry->setValue($capture);
1446 $this->
form->addItem($hidden_user_picture_carry);
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
static getWebspaceDir(string $mode="filesystem")
get webspace directory
ilUserDefinedFields $user_defined_fields
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS User ProfileGUIRequest $profile_request
Class ilTermsOfServiceWithdrawalGUIHelper.
static get(string $a_var)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilTermsOfServiceHelper $termsOfServiceHelper
showPersonalData(bool $a_no_init=false, bool $a_migration_started=false)
RequestInterface $request
const STEP_PUBLISH_OPTIONS
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilAppEventHandler $eventHandler
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilProfileChecklistGUI $checklist
static updateLuceneIndex(array $a_obj_ids)
Update lucene index.
importPersonalDataSelection()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstancesByUserId(int $a_user_id)
Additional user data fields definition.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static isConvertVersionAtLeast(string $a_version)
Compare convert version numbers.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
static getDefaultPortfolio(int $a_user_id)
Get default portfolio of user.
initPersonalDataImportForm()
withAdditionalOnLoadCode(Closure $binder)
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
convertUserPicture(string $uploaded_file, string $image_dir)
__showOtherInformations()
static escapeShellArg(string $a_arg)
workWithUserSetting(string $setting)
userSettingVisible(string $setting)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
ProfileChangeMailTokenRepository $change_mail_token_repo
Interface ilTermsOfServiceDocumentEvaluation.
updateLoginOrSetErrorMessages()
showPublicProfile(bool $a_no_init=false)
ilAuthSession $auth_session
getProfilePortfolio()
has profile set to a portfolio?
Class ilTermsOfServiceEventWithdrawn.
showConsentWithdrawalConfirmation()
ilUserSettingsConfig $user_settings_config
const PERSONAL_DATA_FORM_ID
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__showUserDefinedFields()
setContent(string $a_html)
Sets content for standard template.
static updatePositions(int $a_user_id, array $a_positions)
downloadPersonalData()
Download personal data export file.
const STEP_VISIBILITY_OPTIONS
showChecklist(int $active_step)
static _loginExists(string $a_login, int $a_user_id=0)
check if a login name already exists You may exclude a user from the check by giving his user id as 2...
static isLogin(string $a_login)
static getDefaultSettings()
Get default longitude, latitude and zoom.
const UDF_TYPE_TEXT
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
userSettingEnabled(string $setting)
setBackUrl(string $a_backurl)
Set Back Link URL.
static _getLink(?int $a_ref_id, string $a_type='', array $a_params=array(), string $append="")
ilErrorHandling $errorHandler
form( $class_path, string $cmd)
ilTermsOfServiceDocumentEvaluation $termsOfServiceEvaluation
static redirect(string $a_script)
static _getPersonalPicturePath(int $a_usr_id, string $a_size="small", bool $a_force_pic=false, bool $a_prevent_no_photo_image=false, bool $html_export=false)
static isActivated()
Checks whether Map feature is activated.
Class ilTermsOfServiceHelper.
static ilTempnam(?string $a_temp_path=null)
Returns a unique and non existing Path for e temporary file or directory.
activateTab(string $a_id)
getLinkTarget(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
Error Handling & global info handling uses PEAR error class.
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
showProfile()
show profile form
static redirectToStartingPage(string $target='')
static setClosingContext(int $a_context)
set closing context (for statistics)
__construct(Container $dic, ilPlugin $plugin)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addLocationToForm(ilPropertyFormGUI $a_form, ilObjUser $a_user)
Add location fields to form if activated.
setRightContent(string $a_html)
Sets content of right column.
Interruptive $email_change_confirmation_modal
ilProfileChecklistStatus $checklist_status
static set(string $a_var, $a_val)
Set a value.
static execConvert(string $args)
execute convert command
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
showPublicProfileFields(ilPropertyFormGUI $form, array $prefs, ?object $parent=null, bool $anonymized=false, string $key_suffix="")