19 declare(strict_types=1);
78 $this->
tabs = $DIC[
'ilTabs'];
79 $this->
toolbar = $DIC[
'ilToolbar'];
80 $this->
help = $DIC[
'ilHelp'];
81 $this->
user = $DIC[
'ilUser'];
82 $this->auth_session = $DIC[
'ilAuthSession'];
83 $this->
lng = $DIC[
'lng'];
85 $this->tpl = $DIC[
'tpl'];
86 $this->
ctrl = $DIC[
'ilCtrl'];
87 $this->error_handler = $DIC[
'ilErr'];
88 $this->eventHandler = $DIC[
'ilAppEventHandler'];
89 $this->ui_factory = $DIC[
'ui.factory'];
90 $this->ui_renderer = $DIC[
'ui.renderer'];
91 $this->uploads = $DIC[
'upload'];
92 $this->irss = $DIC[
'resource_storage'];
99 $this->
lng->loadLanguageModule(
'jsmath');
100 $this->
lng->loadLanguageModule(
'pd');
101 $this->upload_error =
'';
102 $this->password_error =
'';
103 $this->
lng->loadLanguageModule(
'user');
104 $this->
ctrl->saveParameter($this,
'prompted');
111 $this->ui_factory = $DIC[
'ui.factory'];
112 $this->ui_renderer = $DIC[
'ui.renderer'];
113 $this->auth_session = $DIC[
'ilAuthSession'];
124 $next_class = $this->
ctrl->getNextClass();
126 switch ($next_class) {
127 case 'ilpublicuserprofilegui':
129 $pub_profile_gui->
setBackUrl($this->
ctrl->getLinkTarget($this,
'showPersonalData'));
130 $this->
ctrl->forwardCommand($pub_profile_gui);
131 $this->tpl->printToStdout();
134 case 'iluserprivacysettingsgui':
137 $this->
tabs->activateTab(
'visibility_settings');
140 $this->
ctrl->forwardCommand($gui);
143 case strtolower(ilLegalDocumentsAgreementGUI::class):
145 $this->tpl->printToStdout();
148 case strtolower(ilLegalDocumentsWithdrawalGUI::class):
150 $this->tpl->printToStdout();
155 $cmd = $this->
ctrl->getCmd(
'showPersonalData');
164 return $this->user_settings_config->isVisibleAndChangeable($setting);
169 return $this->user_settings_config->isVisible($setting);
174 return $this->user_settings_config->isChangeable($setting);
183 if (!$this->
form->hasFileUpload(
'userfile')
184 && $this->profile_request->getUserFileCapture() ===
'') {
185 if ($this->
form->getItemByPostVar(
'userfile')->getDeletionFlag()) {
186 $this->
user->removeUserPicture();
192 if (!$this->uploads->hasBeenProcessed()) {
193 $this->uploads->process();
195 $existing_rid = $this->irss->manage()->find($this->
user->getAvatarRid());
196 $revision_title =
'Avatar for user ' . $this->
user->getLogin();
199 if ($this->
form->hasFileUpload(
'userfile') && $this->uploads->hasBeenProcessed()) {
200 $stream = Streams::ofResource(
202 $this->
form->getFileUpload(
'userfile')[
'tmp_name'],
207 if ($existing_rid === null) {
208 $rid = $this->irss->manage()->stream(
214 $rid = $existing_rid;
215 $this->irss->manage()->replaceWithStream(
224 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'upload_error_file_not_found'),
true);
225 $this->
ctrl->redirect($this,
'showProfile');
227 $this->
user->setAvatarRid($rid->serialize());
229 $this->
user->update();
233 $capture = $this->profile_request->getUserFileCapture();
234 if ($capture === null) {
239 [
'data:image/png;base64,',
' '],
243 $data = base64_decode($img);
244 if (
$data ===
false) {
245 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'upload_error_file_not_found'),
true);
246 $this->
ctrl->redirect($this,
'showProfile');
248 $stream = Streams::ofString(
$data);
250 if ($existing_rid === null) {
251 $rid = $this->irss->manage()->stream(
257 $rid = $existing_rid;
258 $this->irss->manage()->replaceWithStream(
265 $this->
user->setAvatarRid($rid->serialize());
267 $this->
user->update();
272 $this->
user->removeUserPicture();
296 $this->
lng->loadLanguageModule(
'maps');
308 if ($latitude == null && $longitude == null && $zoom == 0) {
310 $latitude = (float) $def[
'latitude'];
311 $longitude = (float) $def[
'longitude'];
312 $zoom = (
int) $def[
'zoom'];
317 $street = $this->
lng->txt(
'street');
321 $city = $this->
lng->txt(
'city');
325 $country = $this->
lng->txt(
'country');
330 $this->
lng->txt(
'location'),
334 $loc_prop->setLongitude($longitude);
335 $loc_prop->setZoom($zoom);
336 $loc_prop->setAddress($street .
',' . $city .
',' . $country);
344 $this->
help->setScreenIdComponent(
'user');
349 $this->
lng->txt(
'user_profile_data'),
350 $this->
ctrl->getLinkTarget($this,
'showPersonalData')
356 $this->
lng->txt(
'user_publish_options'),
357 $this->
ctrl->getLinkTarget($this,
'showPublicProfile')
361 $txt_visibility = $this->checklist_status->anyVisibilitySettings()
362 ? $this->
lng->txt(
'user_visibility_settings')
363 : $this->
lng->txt(
'preview');
365 'visibility_settings',
367 $this->
ctrl->getLinkTargetByClass(
'ilUserPrivacySettingsGUI',
'')
373 $this->
lng->txt(
'export') .
'/' . $this->
lng->txt(
'import'),
374 $this->
ctrl->getLinkTarget($this,
'showExportImport')
382 if ($this->
userSettingVisible(
'matriculation') or count($this->user_defined_fields->getVisibleDefinitions())
383 or $d_set->get(
'user_profile') ==
'1') {
391 $user_defined_data = $this->
user->getUserDefinedData();
392 foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
394 $this->tpl->setCurrentBlock(
'field_text');
395 $this->tpl->setVariable(
399 if (!$definition[
'changeable']) {
400 $this->tpl->setVariable(
'DISABLED_FIELD',
'disabled="disabled"');
402 $this->tpl->setVariable(
'FIELD_NAME',
'udf[' . $definition[
'field_id'] .
']');
404 if ($definition[
'changeable']) {
405 $name =
'udf[' . $definition[
'field_id'] .
']';
411 $this->tpl->setCurrentBlock(
'field_select');
412 $this->tpl->setVariable(
415 $user_defined_data[$field_id],
417 $this->user_defined_fields->fieldValuesToSelectArray(
418 $definition[
'field_values']
429 $this->tpl->parseCurrentBlock();
430 $this->tpl->setCurrentBlock(
'user_defined');
432 if ($definition[
'required']) {
433 $name = $definition[
'field_name'] .
'<span class="asterisk">*</span>';
435 $name = $definition[
'field_name'];
437 $this->tpl->setVariable(
'TXT_FIELD_NAME', $name);
438 $this->tpl->parseCurrentBlock();
445 $this->tpl->setTitle($this->
lng->txt(
'personal_profile'));
449 bool $a_no_init =
false 453 $this->
tabs->activateTab(
'personal_data');
456 if ($this->profile_request->getPrompted() == 1) {
457 $it = $prompt_service->data()->getSettings()->getPromptText($this->
user->getLanguage());
460 $it = $prompt_service->data()->getSettings()->getInfoText($this->
user->getLanguage());
462 if (trim($it) !==
'') {
463 $pub_prof = in_array($this->
user->prefs[
'public_profile'] ??
'', [
'y',
'n',
'g'])
464 ? $this->
user->prefs[
'public_profile']
466 $box = $this->ui_factory->messageBox()->info($it);
467 if ($pub_prof ===
'n') {
468 $box = $box->withLinks(
469 [$this->ui_factory->link()->standard(
470 $this->
lng->txt(
'user_make_profile_public'),
471 $this->
ctrl->getLinkTarget($this,
'showPublicProfile')
475 $it = $this->ui_renderer->render($box);
484 if ($this->
user->getProfileIncomplete()) {
485 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'profile_incomplete'));
490 if ($this->email_change_confirmation_modal !== null) {
491 $modal = $this->ui_renderer->render($this->email_change_confirmation_modal);
494 $this->tpl->setContent($it . $this->
form->getHTML() . $modal);
496 $this->tpl->printToStdout();
504 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
505 $this->
form->setId(self::PERSONAL_DATA_FORM_ID);
508 $user_defined_data = $this->
user->getUserDefinedData();
510 foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
511 $value = $user_defined_data[
'f_' . $field_id] ??
'';
512 $changeable = $definition[
'changeable'] === 1 ? true :
false;
519 $input[
'udf_' . $definition[
'field_id']] = $fprop;
525 $up->skipField(
'password');
526 $up->skipGroup(
'settings');
527 $up->skipGroup(
'preferences');
529 $up->setAjaxCallback(
530 $this->
ctrl->getLinkTargetByClass(
'ilPublicUserProfileGUI',
'doProfileAutoComplete',
'',
true)
534 $up->addStandardFieldsToForm($this->
form, $this->
user, $input);
538 $this->
form->addCommandButton(
'savePersonalData', $this->
lng->txt(
'user_save_continue'));
545 $this->uploads->process();
547 if (!$this->
form->checkInput()
552 $this->
form->setValuesByPost();
561 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_obj_modified'),
true);
563 $this->
ctrl->redirect($this,
'showPublicProfile');
568 $email_input = $this->
form->getItemByPostVar(
'usr_email');
569 if ($email_input !== null && !$email_input->getDisabled()
570 && $this->
form->getInput(
'usr_email') !== $this->
user->getEmail()) {
579 $current_email = $this->
user->getEmail();
581 $this->
user->getProfileIncomplete()
582 && $this->
settings->get(
'require_email') ===
'1' 583 && ($current_email === null || $current_email ===
'')
593 $form_id =
'form_' . self::PERSONAL_DATA_FORM_ID;
594 $modal = $this->ui_factory->modal()->interruptive(
595 $this->
lng->txt(
'confirm'),
596 $this->
lng->txt(
'confirm_logout_for_email_change'),
598 )->withActionButtonLabel($this->
lng->txt(
'change'));
599 $this->email_change_confirmation_modal = $modal->withOnLoad($modal->getShowSignal())
601 static function (
$id) use ($form_id) {
602 return "var button = {$id}.querySelector('input[type=\"submit\"]'); " 603 .
"button.addEventListener('click', (e) => {e.preventDefault();" 604 .
"document.getElementById('{$form_id}').submit();});";
608 $this->
form->setFormAction($this->
ctrl->getFormActionByClass(self::class,
'goToEmailConfirmation'));
614 $login = $this->
form->getInput(
'username');
615 if ((
int) $this->
settings->get(
'allow_change_loginname')
616 && $login !== $this->
user->getLogin()) {
625 $login = $this->
form->getInput(
'username');
627 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
628 $this->
form->getItemByPostVar(
'username')->setAlert($this->
lng->txt(
'login_invalid'));
633 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
634 $this->
form->getItemByPostVar(
'username')->setAlert($this->
lng->txt(
'loginname_already_exists'));
638 $this->
user->setLogin($login);
641 $this->
user->updateLogin($this->
user->getLogin());
644 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
645 $this->
form->getItemByPostVar(
'username')->setAlert($e->getMessage());
653 if (!$this->
form->checkInput()
655 $this->
form->setValuesByPost();
662 $this->auth_session->logout();
664 $token = $this->change_mail_token_repo->getNewTokenForUser($this->
user, $this->
form->getInput(
'usr_email'));
665 $this->
ctrl->redirectToURL(
'login.php?cmd=force_login&target=usr_' . self::CHANGE_EMAIL_CMD .
$token);
672 'firstname' =>
'FirstName',
673 'lastname' =>
'LastName',
675 'sel_country' =>
'SelectedCountry',
676 'phone_office' =>
'PhoneOffice',
677 'phone_home' =>
'PhoneHome',
678 'phone_mobile' =>
'PhoneMobile',
679 'referral_comment' =>
'Comment',
680 'interests_general' =>
'GeneralInterests',
681 'interests_help_offered' =>
'OfferingHelp',
682 'interests_help_looking' =>
'LookingForHelp' 685 foreach ($up->getStandardFields() as
$f => $p) {
687 $item = $this->
form->getItemByPostVar(
'usr_' . $f);
688 if ($item && !$item->getDisabled()) {
689 $value = $this->
form->getInput(
'usr_' . $f);
693 $this->
user->setEmail($value);
697 $value = $item->getDate();
698 $this->
user->setBirthday($value
703 $this->
user->setSecondEmail($value);
706 $m = $map[
$f] ?? ucfirst($f);
707 $this->
user->{
'set' . $m}($value);
712 $this->
user->setFullname();
724 $defs = $this->user_defined_fields->getVisibleDefinitions();
726 foreach ($defs as $definition) {
727 $f =
'udf_' . $definition[
'field_id'];
728 $item = $this->
form->getItemByPostVar(
$f);
729 if ($item && !$item->getDisabled()) {
730 $udf[$definition[
'field_id']] = $this->
form->getInput(
$f);
733 $this->
user->setUserDefinedData($udf);
738 $this->
user->setProfileIncomplete(
false);
741 $this->
user->setTitle($this->
user->getFullname());
742 $this->
user->setDescription($this->
user->getEmail());
744 $this->
user->update();
749 $token = $this->profile_request->getToken();
750 $new_email = $this->change_mail_token_repo->getNewEmailForUser($this->
user,
$token);
752 if ($new_email !==
'') {
753 $this->
user->setEmail($new_email);
754 $this->
user->update();
755 $this->change_mail_token_repo->deleteEntryByToken(
$token);
756 $this->tpl->setOnScreenMessage(
758 $this->
lng->txt(
'saved_successfully')
764 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'email_could_not_be_changed'));
770 $this->
tabs->activateTab(
'public_profile');
779 $this->tpl->setContent($this->
form->getHTML());
780 $this->tpl->printToStdout();
785 if ($this->
settings->get(
'user_portfolios')) {
795 $this->
form->setTitle($this->
lng->txt(
'user_publish_options'));
796 $this->
form->setDescription($this->
lng->txt(
'user_public_profile_info'));
797 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
801 if (!$portfolio_id) {
804 $info = $this->
lng->txt(
'user_activate_public_profile_info');
806 $pub_prof = $profile_mode->getMode();
807 $radg->setValue($pub_prof);
808 $op1 =
new ilRadioOption($this->
lng->txt(
'usr_public_profile_disabled'),
'n', $this->
lng->txt(
'usr_public_profile_disabled_info'));
809 $radg->addOption($op1);
810 $op2 =
new ilRadioOption($this->
lng->txt(
'usr_public_profile_logged_in'),
'y');
811 $radg->addOption($op2);
812 if ($this->
settings->get(
'enable_global_profiles')) {
813 $op3 =
new ilRadioOption($this->
lng->txt(
'usr_public_profile_global'),
'g');
814 $radg->addOption($op3);
816 $this->
form->addItem($radg);
819 if ($this->
settings->get(
'user_portfolios')) {
821 $href = $this->
ctrl->getLinkTargetByClass(ilDashboardGUI::class,
'jumpToPortfolio');
822 $prtf =
'<br />' . $this->
lng->txt(
'user_profile_portfolio');
823 $prtf .=
'<br /><a href="' . $href .
'">» ' .
824 $this->
lng->txt(
'user_portfolios') .
'</a>';
830 $this->
ctrl->setParameterByClass(ilDashboardGUI::class,
'prt_id', $portfolio_id);
831 $href = $this->
ctrl->getLinkTargetByClass(ilDashboardGUI::class,
'jumpToPortfolio');
832 $this->
ctrl->clearParameterByClass(ilDashboardGUI::class,
'prt_id');
833 $prtf = $this->
lng->txt(
'user_profile_portfolio_selected');
834 $prtf .=
'<br /><a href="' . $href .
'">» ' .
835 $this->
lng->txt(
'portfolio') .
'</a>';
838 $info->setHtml($prtf);
839 $this->
form->addItem($info);
849 $this->
form->setForceTopButtons(
true);
850 $this->
form->addCommandButton(
'savePublicProfile', $this->
lng->txt(
'user_save_continue'));
856 ?
object $parent = null,
857 bool $anonymized =
false,
858 string $key_suffix =
'' 860 $birthday = $this->
user->getBirthday();
864 $gender = $this->
user->getGender();
866 $gender = $this->
lng->txt(
'gender_' . $gender);
869 $txt_sel_country =
'';
870 if ($this->
user->getSelectedCountry() !=
'') {
871 $this->
lng->loadLanguageModule(
'meta');
872 $txt_sel_country = $this->
lng->txt(
'meta_c_' . $this->
user->getSelectedCountry());
878 $pic =
"<img src='{$pic}' alt='{$this->lng->txt('user_avatar')}' />";
883 'title' => $this->
user->getUTitle(),
884 'birthday' => $birthday,
887 'interests_general' => $this->
user->getGeneralInterestsAsText(),
888 'interests_help_offered' => $this->
user->getOfferingHelpAsText(),
889 'interests_help_looking' => $this->
user->getLookingForHelpAsText(),
890 'org_units' => $this->
user->getOrgUnitsRepresentation(),
891 'institution' => $this->
user->getInstitution(),
892 'department' => $this->
user->getDepartment(),
893 'street' => $this->
user->getStreet(),
894 'zipcode' => $this->
user->getZipcode(),
895 'city' => $this->
user->getCity(),
896 'country' => $this->
user->getCountry(),
897 'sel_country' => $txt_sel_country,
898 'phone_office' => $this->
user->getPhoneOffice(),
899 'phone_home' => $this->
user->getPhoneHome(),
900 'phone_mobile' => $this->
user->getPhoneMobile(),
901 'fax' => $this->
user->getFax(),
902 'email' => $this->
user->getEmail(),
903 'second_email' => $this->
user->getSecondEmail(),
904 'hobby' => $this->
user->getHobby(),
905 'matriculation' => $this->
user->getMatriculation()
910 $val_array[
'location'] = ((
int) $this->
user->getLatitude() +
911 (
int) $this->
user->getLongitude()
912 + (
int) $this->
user->getLocationZoom() > 0)
916 foreach ($val_array as
$key => $value) {
917 if (in_array($value, [
'',
'-']) && !$anonymized) {
928 $caption =
'personal_picture';
932 $caption =
'person_title';
939 if (isset($prefs[
'public_' .
$key]) && $prefs[
'public_' .
$key] ==
'y') {
940 $cb->setChecked(
true);
942 $cb->setOptionTitle((
string) $value);
947 $parent->addSubItem($cb);
953 $user_defined_data = [];
955 $user_defined_data = $this->
user->getUserDefinedData();
957 foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
959 $cb =
new ilCheckboxInputGUI($definition[
'field_name'],
'chk_udf_' . $definition[
'field_id'] . $key_suffix);
960 $cb->setOptionTitle($user_defined_data[
'f_' . $definition[
'field_id']] ??
'');
961 $public_udf = (string) ($prefs[
'public_udf_' . $definition[
'field_id']] ??
'');
962 if ($public_udf ===
'y') {
963 $cb->setChecked(
true);
969 $parent->addSubItem($cb);
980 if ($ass->getPosition()) {
981 $badge =
new ilBadge($ass->getBadgeId());
982 $badge_options[] = $badge->getTitle();
986 if (count($badge_options) > 1) {
988 $badge_order->setMultiValues($badge_options);
989 $badge_order->setValue(array_shift($badge_options));
990 $badge_order->setMulti(
true,
true,
false);
995 $parent->addSubItem($badge_order);
1003 $ne->setValue(ilLink::_getLink($this->
user->getId(),
'usr'));
1007 $parent->addSubItem($ne);
1016 if ($this->
form->checkInput()) {
1018 if ($this->
form->getInput(
'public_profile') !=
'') {
1019 $this->
user->setPref(
'public_profile', $this->
form->getInput(
'public_profile'));
1023 $val_array = [
'title',
'birthday',
'gender',
'org_units',
1024 'institution',
'department',
'upload',
'street',
'zipcode',
1025 'city',
'country',
'sel_country',
'phone_office',
'phone_home',
1026 'phone_mobile',
'fax',
'email',
'second_email',
'hobby',
1027 'matriculation',
'location',
'interests_general',
1028 'interests_help_offered',
'interests_help_looking'];
1032 foreach ($val_array as
$key => $value) {
1033 if ($checked_values[
'chk_' . $value] ??
false) {
1034 $this->
user->setPref(
'public_' . $value,
'y');
1036 $this->
user->setPref(
'public_' . $value,
'n');
1040 foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
1041 if ($checked_values[
'chk_udf_' . $definition[
'field_id']] ??
false) {
1042 $this->
user->setPref(
'public_udf_' . $definition[
'field_id'],
'y');
1044 $this->
user->setPref(
'public_udf_' . $definition[
'field_id'],
'n');
1048 $this->
user->update();
1050 switch ($this->
form->getInput(
'public_profile')) {
1061 $badgePositions = [];
1062 $bpos = $this->
form->getInput(
'bpos' . $key_suffix);
1063 if (isset($bpos) && is_array($bpos)) {
1064 $badgePositions = $bpos;
1067 if (count($badgePositions) > 0) {
1075 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_obj_modified'),
true);
1084 $this->
ctrl->redirectByClass(
'iluserprivacysettingsgui',
'');
1087 $this->
form->setValuesByPost();
1088 $this->tpl->showPublicProfile(
true);
1094 switch ($this->
form->getInput(
'public_profile')) {
1103 $checked_values = [];
1104 $post = $this->profile_request->getParsedBody();
1105 foreach (
$post as $k => $v) {
1106 if (strpos($k,
'chk_') !== 0) {
1109 if (substr($k, -2) === $key_suffix) {
1110 $k = str_replace([
'-1',
'-2'],
'', $k);
1112 $checked_values[$k] = $v;
1114 foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
1115 if (isset(
$post[
'chk_udf_' . $definition[
'field_id'] . $key_suffix])) {
1116 $checked_values[
'chk_udf_' . $definition[
'field_id']] =
'1';
1119 return $checked_values;
1124 $this->
tabs->activateTab(
'export');
1127 $button = $this->ui_factory->link()->standard(
1128 $this->
lng->txt(
'pd_export_profile'),
1129 $this->
ctrl->getLinkTarget($this,
'exportPersonalData')
1131 $this->
toolbar->addStickyItem($button);
1133 $exp_file = $this->
user->getPersonalDataExportFile();
1134 if ($exp_file !=
'') {
1135 $this->
toolbar->addSeparator();
1137 $this->ui_factory->link()->standard(
1138 $this->
lng->txt(
"pd_download_last_export_file"),
1139 $this->
ctrl->getLinkTarget($this,
"downloadPersonalData")
1144 $this->
toolbar->addSeparator();
1146 $this->ui_factory->link()->standard(
1147 $this->
lng->txt(
"pd_import_personal_data"),
1148 $this->
ctrl->getLinkTarget($this,
"importPersonalDataSelection")
1152 $this->tpl->printToStdout();
1157 $this->
user->exportPersonalData();
1158 $this->
user->sendPersonalDataFile();
1159 $this->
ctrl->redirect($this,
'showExportImport');
1167 $this->
user->sendPersonalDataFile();
1172 $this->
tabs->activateTab(
'export');
1177 $this->tpl->setContent($this->
form->getHTML());
1178 $this->tpl->printToStdout();
1188 $fi->setSuffixes([
'zip']);
1189 $this->
form->addItem($fi);
1193 $this->
form->addItem($cb);
1197 $this->
form->addItem($cb);
1201 $this->
form->addItem($cb);
1205 $this->
form->addItem($cb);
1207 $this->
form->addCommandButton(
'importPersonalData', $this->
lng->txt(
'import'));
1208 $this->
form->addCommandButton(
'showExportImport', $this->
lng->txt(
'cancel'));
1210 $this->
form->setTitle($this->
lng->txt(
'pd_import_personal_data'));
1211 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
1217 if ($this->
form->checkInput()) {
1218 $this->
user->importPersonalData(
1220 (
bool) $this->
form->getInput(
'profile_data'),
1221 (bool) $this->
form->getInput(
'settings'),
1222 (bool) $this->
form->getInput(
'notes'),
1223 (bool) $this->
form->getInput(
'calendar')
1225 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_obj_modified'),
true);
1226 $this->
ctrl->redirect($this,
'');
1228 $this->
tabs->activateTab(
'export');
1230 $this->
form->setValuesByPost();
1231 $this->tpl->setContent($this->
form->getHTML());
1232 $this->tpl->printToStdout();
1244 $capture = $this->profile_request->getUserFileCapture();
1246 if ($capture !==
'') {
1247 $this->
form->getItemByPostVar(
'userfile')->setImage($capture);
1249 $hidden_user_picture_carry->setValue($capture);
1250 $this->
form->addItem($hidden_user_picture_carry);
ilUserDefinedFields $user_defined_fields
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
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...
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 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)
ResourceStakeholder $stakeholder
__showOtherInformations()
workWithUserSetting(string $setting)
userSettingVisible(string $setting)
ProfileChangeMailTokenRepository $change_mail_token_repo
updateLoginOrSetErrorMessages()
showPublicProfile(bool $a_no_init=false)
ilAuthSession $auth_session
setBackUrl(string $backurl)
Set Back Link URL.
ilUserSettingsConfig $user_settings_config
const PERSONAL_DATA_FORM_ID
GUI class for public user profile presentation.
__showUserDefinedFields()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static updatePositions(int $a_user_id, array $a_positions)
downloadPersonalData()
Download personal data export file.
ProfileGUIRequest $profile_request
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...
userSettingEnabled(string $setting)
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)
showPersonalData(bool $a_no_init=false)
static isActivated()
Checks whether Map feature is activated.
ilErrorHandling $error_handler
form( $class_path, string $cmd, string $submit_caption="")
Error Handling & global info handling.
ilGlobalTemplateInterface $tpl
showProfile()
show profile form
static setClosingContext(int $a_context)
set closing context (for statistics)
$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
Interface ResourceStakeholder.
showPublicProfileFields(ilPropertyFormGUI $form, array $prefs, ?object $parent=null, bool $anonymized=false, string $key_suffix='')
ilProfileChecklistStatus $checklist_status
static set(string $a_var, $a_val)
Set a value.