19 declare(strict_types=1);
    85         $this->
tabs = $DIC[
'ilTabs'];
    86         $this->
toolbar = $DIC[
'ilToolbar'];
    87         $this->
help = $DIC[
'ilHelp'];
    88         $this->
user = $DIC[
'ilUser'];
    89         $this->auth_session = $DIC[
'ilAuthSession'];
    90         $this->
lng = $DIC[
'lng'];
    92         $this->tpl = $DIC[
'tpl'];
    93         $this->
ctrl = $DIC[
'ilCtrl'];
    94         $this->error_handler = $DIC[
'ilErr'];
    95         $this->eventHandler = $DIC[
'ilAppEventHandler'];
    96         $this->ui_factory = $DIC[
'ui.factory'];
    97         $this->ui_renderer = $DIC[
'ui.renderer'];
    98         $this->uploads = $DIC[
'upload'];
    99         $this->irss = $DIC[
'resource_storage'];
   100         $this->ui_factory = $DIC[
'ui.factory'];
   101         $this->ui_renderer = $DIC[
'ui.renderer'];
   102         $this->auth_session = $DIC[
'ilAuthSession'];
   103         $this->static_url = $DIC[
'static_url'];
   119         $this->prompt_repository = 
new PromptRepository(
   130         $this->
lng->loadLanguageModule(
'jsmath');
   131         $this->
lng->loadLanguageModule(
'pd');
   132         $this->
lng->loadLanguageModule(
'user');
   133         $this->
ctrl->saveParameter($this, 
'prompted');
   138         $next_class = $this->
ctrl->getNextClass();
   140         switch ($next_class) {
   141             case 'ilpublicuserprofilegui':
   143                 $pub_profile_gui->
setBackUrl($this->
ctrl->getLinkTarget($this, 
'showPersonalData'));
   144                 $this->
ctrl->forwardCommand($pub_profile_gui);
   145                 $this->tpl->printToStdout();
   148             case 'iluserprivacysettingsgui':
   151                 $this->
tabs->activateTab(
'visibility_settings');
   152                 $this->
showChecklist(ChecklistStatus::STEP_VISIBILITY_OPTIONS);
   154                 $this->
ctrl->forwardCommand($gui);
   157             case strtolower(ilLegalDocumentsAgreementGUI::class):
   159                 $this->tpl->printToStdout();
   162             case strtolower(ilLegalDocumentsWithdrawalGUI::class):
   164                 $this->tpl->printToStdout();
   169                 $cmd = $this->
ctrl->getCmd(
'showPersonalData');
   178         return $this->user_settings_config->isVisibleAndChangeable($setting);
   183         return $this->user_settings_config->isVisible($setting);
   188         return $this->user_settings_config->isChangeable($setting);
   197         if (!$this->
form->hasFileUpload(
'userfile')
   198             && $this->profile_request->getUserFileCapture() === 
'') {
   199             if ($this->
form->getItemByPostVar(
'userfile')->getDeletionFlag()) {
   200                 $this->
user->removeUserPicture();
   206         if (!$this->uploads->hasBeenProcessed()) {
   207             $this->uploads->process();
   209         $existing_rid = $this->irss->manage()->find($this->
user->getAvatarRid());
   210         $revision_title = 
'Avatar for user ' . $this->
user->getLogin();
   213         if ($this->
form->hasFileUpload(
'userfile') && $this->uploads->hasBeenProcessed()) {
   214             $stream = Streams::ofResource(
   216                     $this->
form->getFileUpload(
'userfile')[
'tmp_name'],
   221             if ($existing_rid === null) {
   222                 $rid = $this->irss->manage()->stream(
   228                 $rid = $existing_rid;
   229                 $this->irss->manage()->replaceWithStream(
   238                 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'upload_error_file_not_found'), 
true);
   239                 $this->
ctrl->redirect($this, 
'showProfile');
   241             $this->
user->setAvatarRid($rid->serialize());
   243             $this->
user->update();
   247         $capture = $this->profile_request->getUserFileCapture();
   248         if ($capture === null) {
   253             [
'data:image/png;base64,', 
' '],
   257         $data = base64_decode($img);
   258         if (
$data === 
false) {
   259             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'upload_error_file_not_found'), 
true);
   260             $this->
ctrl->redirect($this, 
'showProfile');
   262         $stream = Streams::ofString(
$data);
   264         if ($existing_rid === null) {
   265             $rid = $this->irss->manage()->stream(
   271             $rid = $existing_rid;
   272             $this->irss->manage()->replaceWithStream(
   279         $this->
user->setAvatarRid($rid->serialize());
   281         $this->
user->update();
   286         $this->
user->removeUserPicture();
   310         $this->
lng->loadLanguageModule(
'maps');
   322         if ($latitude == null && $longitude == null && $zoom == 0) {
   324             $latitude = (float) $def[
'latitude'];
   325             $longitude = (float) $def[
'longitude'];
   326             $zoom = (
int) $def[
'zoom'];
   331             $street = $this->
lng->txt(
'street');
   335             $city = $this->
lng->txt(
'city');
   339             $country = $this->
lng->txt(
'country');
   344             $this->
lng->txt(
'location'),
   348         $loc_prop->setLongitude($longitude);
   349         $loc_prop->setZoom($zoom);
   350         $loc_prop->setAddress($street . 
',' . $city . 
',' . $country);
   358         $this->
help->setScreenIdComponent(
'user');
   363             $this->
lng->txt(
'user_profile_data'),
   364             $this->
ctrl->getLinkTarget($this, 
'showPersonalData')
   370             $this->
lng->txt(
'user_publish_options'),
   371             $this->
ctrl->getLinkTarget($this, 
'showPublicProfile')
   375         $txt_visibility = $this->checklist_status->anyVisibilitySettings()
   376             ? $this->
lng->txt(
'user_visibility_settings')
   377             : $this->
lng->txt(
'preview');
   379             'visibility_settings',
   381             $this->
ctrl->getLinkTargetByClass(
'ilUserPrivacySettingsGUI', 
'')
   387             $this->
lng->txt(
'export') . 
'/' . $this->
lng->txt(
'import'),
   388             $this->
ctrl->getLinkTarget($this, 
'showExportImport')
   396         if ($this->
userSettingVisible(
'matriculation') or count($this->user_defined_fields->getVisibleDefinitions())
   397             or $d_set->get(
'user_profile') == 
'1') {
   405         $user_defined_data = $this->
user->getUserDefinedData();
   406         foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
   408                 $this->tpl->setCurrentBlock(
'field_text');
   409                 $this->tpl->setVariable(
   413                 if (!$definition[
'changeable']) {
   414                     $this->tpl->setVariable(
'DISABLED_FIELD', 
'disabled="disabled"');
   416                 $this->tpl->setVariable(
'FIELD_NAME', 
'udf[' . $definition[
'field_id'] . 
']');
   418                 if ($definition[
'changeable']) {
   419                     $name = 
'udf[' . $definition[
'field_id'] . 
']';
   425                 $this->tpl->setCurrentBlock(
'field_select');
   426                 $this->tpl->setVariable(
   429                         $user_defined_data[$field_id],
   431                         $this->user_defined_fields->fieldValuesToSelectArray(
   432                             $definition[
'field_values']
   443             $this->tpl->parseCurrentBlock();
   444             $this->tpl->setCurrentBlock(
'user_defined');
   446             if ($definition[
'required']) {
   447                 $name = $definition[
'field_name'] . 
'<span class="asterisk">*</span>';
   449                 $name = $definition[
'field_name'];
   451             $this->tpl->setVariable(
'TXT_FIELD_NAME', $name);
   452             $this->tpl->parseCurrentBlock();
   459         $this->tpl->setTitle($this->
lng->txt(
'personal_profile'));
   463         bool $a_no_init = 
false   465         $this->
tabs->activateTab(
'personal_data');
   475             if ($this->
user->getProfileIncomplete()) {
   476                 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'profile_incomplete'));
   481         if ($this->email_change_confirmation_modal !== null) {
   482             $modal = $this->ui_renderer->render($this->email_change_confirmation_modal);
   485         $this->tpl->setContent($this->
buildInfoText() . $this->
form->getHTML() . $modal);
   487         $this->tpl->printToStdout();
   492         $change_mail_info = 
'';
   493         if ($this->change_mail_token_repo->hasUserValidEmailConfirmationToken($this->user)) {
   494             $change_mail_info = $this->
lng->txt(
'change_email_info_message');
   498         if ($this->profile_request->getPrompted() === 1) {
   499             $it = $this->prompt_repository->getSettings()->getPromptText($this->
user->getLanguage());
   502             $it = $this->prompt_repository->getSettings()->getInfoText($this->
user->getLanguage());
   504         if (trim($it) === 
'') {
   505             return $change_mail_info === 
''   507                 : $this->ui_renderer->render($this->ui_factory->messageBox()->info($change_mail_info));
   510         if ($change_mail_info !== 
'') {
   511             $it .= 
'<br>' . $change_mail_info;
   514         $pub_prof = in_array($this->
user->prefs[
'public_profile'] ?? 
'', [
'y', 
'n', 
'g'])
   515             ? $this->
user->prefs[
'public_profile']
   517         $box = $this->ui_factory->messageBox()->info($it);
   518         if ($pub_prof === 
'n') {
   519             $box = $box->withLinks(
   520                 [$this->ui_factory->link()->standard(
   521                     $this->
lng->txt(
'user_make_profile_public'),
   522                     $this->
ctrl->getLinkTarget($this, 
'showPublicProfile')
   526         return $this->ui_renderer->render($box);
   534         $this->
form->setFormAction($this->
ctrl->getFormAction($this));
   535         $this->
form->setId(self::PERSONAL_DATA_FORM_ID);
   537         $user_defined_data = $this->
user->getUserDefinedData();
   539         foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
   540             $value = $user_defined_data[
'f_' . $field_id] ?? 
'';
   541             $changeable = $definition[
'changeable'] === 1 ? true : 
false;
   548                 $input[
'udf_' . $definition[
'field_id']] = $fprop;
   554         $up->skipField(
'password');
   555         $up->skipGroup(
'settings');
   556         $up->skipGroup(
'preferences');
   558         $up->setAjaxCallback(
   559             $this->
ctrl->getLinkTargetByClass(
'ilPublicUserProfileGUI', 
'doProfileAutoComplete', 
'', 
true)
   563         $up->addStandardFieldsToForm($this->
form, $this->
user, $input);
   567         $this->
form->addCommandButton(
'savePersonalData', $this->
lng->txt(
'user_save_continue'));
   574         $this->uploads->process();
   576         if (!$this->
form->checkInput()
   581             $this->
form->setValuesByPost();
   589         $this->checklist_status->saveStepSucess(ChecklistStatus::STEP_PROFILE_DATA);
   590         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_obj_modified'), 
true);
   592         $this->
ctrl->redirect($this, 
'showPublicProfile');
   597         $email_input = $this->
form->getItemByPostVar(
'usr_email');
   598         if ($email_input !== null && !$email_input->getDisabled()
   599             && $this->
form->getInput(
'usr_email') !== $this->
user->getEmail()) {
   608         $current_email = $this->
user->getEmail();
   610             $this->
user->getProfileIncomplete()
   611             && $this->
settings->get(
'require_email') === 
'1'   612             && ($current_email === null || $current_email === 
'')
   622         $form_id = 
'form_' . self::PERSONAL_DATA_FORM_ID;
   624         $message = $this->
lng->txt(
'confirm_logout_for_email_change');
   626             $message .= 
'<br>' . $this->
lng->txt(
'confirm_logout_for_email_change_with_confirmation');
   629         $modal = $this->ui_factory->modal()->interruptive(
   630             $this->
lng->txt(
'confirm'),
   633         )->withActionButtonLabel($this->
lng->txt(
'change'));
   634         $this->email_change_confirmation_modal = $modal->withOnLoad($modal->getShowSignal())
   636                 static function (
$id) use ($form_id) {
   637                     return "var button = {$id}.querySelector('input[type=\"submit\"]'); "   638                     . 
"button.addEventListener('click', (e) => {e.preventDefault();"   639                     . 
"document.getElementById('{$form_id}').submit();});";
   643         $this->
form->setFormAction($this->
ctrl->getFormActionByClass(self::class, 
'goToEmailConfirmation'));
   649         $login = $this->
form->getInput(
'username');
   650         if ((
int) $this->
settings->get(
'allow_change_loginname')
   651            && $login !== $this->
user->getLogin()) {
   660         $login = $this->
form->getInput(
'username');
   662             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
   663             $this->
form->getItemByPostVar(
'username')->setAlert($this->
lng->txt(
'login_invalid'));
   668             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
   669             $this->
form->getItemByPostVar(
'username')->setAlert($this->
lng->txt(
'loginname_already_exists'));
   673         $this->
user->setLogin($login);
   676             $this->
user->updateLogin($this->
user->getLogin());
   679             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
   680             $this->
form->getItemByPostVar(
'username')->setAlert($e->getMessage());
   688         if (!$this->
form->checkInput()
   690             $this->
form->setValuesByPost();
   697         $this->auth_session->logout();
   699         $token = $this->change_mail_token_repo->getNewTokenForUser(
   701             $this->
form->getInput(
'usr_email'),
   704         $this->
ctrl->redirectToURL(
   705             $token->getUriForStatus($this->static_url->builder())->__toString()
   713             'firstname' => 
'FirstName',
   714             'lastname' => 
'LastName',
   716             'sel_country' => 
'SelectedCountry',
   717             'phone_office' => 
'PhoneOffice',
   718             'phone_home' => 
'PhoneHome',
   719             'phone_mobile' => 
'PhoneMobile',
   720             'referral_comment' => 
'Comment',
   721             'interests_general' => 
'GeneralInterests',
   722             'interests_help_offered' => 
'OfferingHelp',
   723             'interests_help_looking' => 
'LookingForHelp'   726         foreach ($up->getStandardFields() as 
$f => $p) {
   728             $item = $this->
form->getItemByPostVar(
'usr_' . $f);
   729             if ($item && !$item->getDisabled()) {
   730                 $value = $this->
form->getInput(
'usr_' . $f);
   734                             $this->
user->setEmail($value);
   738                         $value = $item->getDate();
   739                         $this->
user->setBirthday($value
   744                         $this->
user->setSecondEmail($value);
   747                         $m = $map[
$f] ?? ucfirst($f);
   748                         $this->
user->{
'set' . $m}($value);
   753         $this->
user->setFullname();
   765         $defs = $this->user_defined_fields->getVisibleDefinitions();
   767         foreach ($defs as $definition) {
   768             $f = 
'udf_' . $definition[
'field_id'];
   769             $item = $this->
form->getItemByPostVar(
$f);
   770             if ($item && !$item->getDisabled()) {
   771                 $udf[$definition[
'field_id']] = $this->
form->getInput(
$f);
   774         $this->
user->setUserDefinedData($udf);
   779         $this->
user->setProfileIncomplete(
false);
   782         $this->
user->setTitle($this->
user->getFullname());
   783         $this->
user->setDescription($this->
user->getEmail());
   785         $this->
user->update();
   790         $token = $this->change_mail_token_repo->getTokenForTokenString(
   791             $this->profile_request->getToken(),
   796             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'email_could_not_be_changed'));
   801         if (
$token->getStatus() === ChangeMailStatus::Login
   805                 $this->change_mail_token_repo->moveToNextStep(
$token, time())
   806                         ->getUriForStatus($this->static_url->builder()),
   809             ))->
send(
$token->getNewEmail(), ChangeMailStatus::EmailConfirmation->getValidity($this->
settings));
   810             $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'change_email_email_sent'));
   816         $this->
user->update();
   817         $this->change_mail_token_repo->deleteEntryByToken(
$token->getToken());
   818         $this->change_mail_token_repo->deleteExpiredEntries();
   820         $this->tpl->setOnScreenMessage(
   822             $this->
lng->txt(
'saved_successfully')
   830         $this->
tabs->activateTab(
'public_profile');
   839         $this->tpl->setContent($this->
form->getHTML());
   840         $this->tpl->printToStdout();
   845         if ($this->
settings->get(
'user_portfolios')) {
   855         $this->
form->setTitle($this->
lng->txt(
'user_publish_options'));
   856         $this->
form->setDescription($this->
lng->txt(
'user_public_profile_info'));
   857         $this->
form->setFormAction($this->
ctrl->getFormAction($this));
   861         if (!$portfolio_id) {
   864             $info = $this->
lng->txt(
'user_activate_public_profile_info');
   865             $profile_mode = 
new ProfileMode($this->
lng, $this->
settings, $this->
user);
   866             $pub_prof = $profile_mode->getMode();
   867             $radg->setValue($pub_prof);
   868             $op1 = 
new ilRadioOption($this->
lng->txt(
'usr_public_profile_disabled'), 
'n', $this->
lng->txt(
'usr_public_profile_disabled_info'));
   869             $radg->addOption($op1);
   870             $op2 = 
new ilRadioOption($this->
lng->txt(
'usr_public_profile_logged_in'), 
'y');
   871             $radg->addOption($op2);
   872             if ($this->
settings->get(
'enable_global_profiles')) {
   873                 $op3 = 
new ilRadioOption($this->
lng->txt(
'usr_public_profile_global'), 
'g');
   874                 $radg->addOption($op3);
   876             $this->
form->addItem($radg);
   879             if ($this->
settings->get(
'user_portfolios')) {
   881                 $href = $this->
ctrl->getLinkTargetByClass(ilDashboardGUI::class, 
'jumpToPortfolio');
   882                 $prtf = 
'<br />' . $this->
lng->txt(
'user_profile_portfolio');
   883                 $prtf .= 
'<br /><a href="' . $href . 
'">» ' .
   884                     $this->
lng->txt(
'user_portfolios') . 
'</a>';
   890             $this->
ctrl->setParameterByClass(ilDashboardGUI::class, 
'prt_id', $portfolio_id);
   891             $href = $this->
ctrl->getLinkTargetByClass(ilDashboardGUI::class, 
'jumpToPortfolio');
   892             $this->
ctrl->clearParameterByClass(ilDashboardGUI::class, 
'prt_id');
   893             $prtf = $this->
lng->txt(
'user_profile_portfolio_selected');
   894             $prtf .= 
'<br /><a href="' . $href . 
'">» ' .
   895                 $this->
lng->txt(
'portfolio') . 
'</a>';
   898             $info->setHtml($prtf);
   899             $this->
form->addItem($info);
   909         $this->
form->setForceTopButtons(
true);
   910         $this->
form->addCommandButton(
'savePublicProfile', $this->
lng->txt(
'user_save_continue'));
   916         ?
object $parent = null,
   917         bool $anonymized = 
false,
   918         string $key_suffix = 
''   920         $birthday = $this->
user->getBirthday();
   924         $gender = $this->
user->getGender();
   926             $gender = $this->
lng->txt(
'gender_' . $gender);
   929         $txt_sel_country = 
'';
   930         if ($this->
user->getSelectedCountry() != 
'') {
   931             $this->
lng->loadLanguageModule(
'meta');
   932             $txt_sel_country = $this->
lng->txt(
'meta_c_' . $this->
user->getSelectedCountry());
   938             $pic = 
"<img src='{$pic}' alt='{$this->lng->txt('user_avatar')}' />";
   943             'title' => $this->
user->getUTitle(),
   944             'birthday' => $birthday,
   947             'interests_general' => $this->
user->getGeneralInterestsAsText(),
   948             'interests_help_offered' => $this->
user->getOfferingHelpAsText(),
   949             'interests_help_looking' => $this->
user->getLookingForHelpAsText(),
   950             'org_units' => $this->
user->getOrgUnitsRepresentation(),
   951             'institution' => $this->
user->getInstitution(),
   952             'department' => $this->
user->getDepartment(),
   953             'street' => $this->
user->getStreet(),
   954             'zipcode' => $this->
user->getZipcode(),
   955             'city' => $this->
user->getCity(),
   956             'country' => $this->
user->getCountry(),
   957             'sel_country' => $txt_sel_country,
   958             'phone_office' => $this->
user->getPhoneOffice(),
   959             'phone_home' => $this->
user->getPhoneHome(),
   960             'phone_mobile' => $this->
user->getPhoneMobile(),
   961             'fax' => $this->
user->getFax(),
   962             'email' => $this->
user->getEmail(),
   963             'second_email' => $this->
user->getSecondEmail(),
   964             'hobby' => $this->
user->getHobby(),
   965             'matriculation' => $this->
user->getMatriculation()
   970             $val_array[
'location'] = ((
int) $this->
user->getLatitude() +
   971                 (
int) $this->
user->getLongitude()
   972                 + (
int) $this->
user->getLocationZoom() > 0)
   976         foreach ($val_array as $key => $value) {
   977             if (in_array($value, [
'', 
'-']) && !$anonymized) {
   988                         $caption = 
'personal_picture';
   992                         $caption = 
'person_title';
   999                 if (isset($prefs[
'public_' . $key]) && $prefs[
'public_' . $key] == 
'y') {
  1000                     $cb->setChecked(
true);
  1002                 $cb->setOptionTitle((
string) $value);
  1007                     $parent->addSubItem($cb);
  1013         $user_defined_data = [];
  1015             $user_defined_data = $this->
user->getUserDefinedData();
  1017         foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
  1019             $cb = 
new ilCheckboxInputGUI($definition[
'field_name'], 
'chk_udf_' . $definition[
'field_id'] . $key_suffix);
  1020             $cb->setOptionTitle($user_defined_data[
'f_' . $definition[
'field_id']] ?? 
'');
  1021             $public_udf = (string) ($prefs[
'public_udf_' . $definition[
'field_id']] ?? 
'');
  1022             if ($public_udf === 
'y') {
  1023                 $cb->setChecked(
true);
  1029                 $parent->addSubItem($cb);
  1036                 $badge_options = [];
  1040                     if ($ass->getPosition()) {
  1041                         $badge = 
new ilBadge($ass->getBadgeId());
  1042                         $badge_options[] = $badge->getTitle();
  1046                 if (count($badge_options) > 1) {
  1048                     $badge_order->setMultiValues($badge_options);
  1049                     $badge_order->setValue(array_shift($badge_options));
  1050                     $badge_order->setMulti(
true, 
true, 
false);
  1055                         $parent->addSubItem($badge_order);
  1063         $ne->setValue(ilLink::_getLink($this->
user->getId(), 
'usr'));
  1067             $parent->addSubItem($ne);
  1076         if ($this->
form->checkInput()) {
  1078             if ($this->
form->getInput(
'public_profile') != 
'') {
  1079                 $this->
user->setPref(
'public_profile', $this->
form->getInput(
'public_profile'));
  1083             $val_array = [
'title', 
'birthday', 
'gender', 
'org_units',
  1084                 'institution', 
'department', 
'upload', 
'street', 
'zipcode',
  1085                 'city', 
'country', 
'sel_country', 
'phone_office', 
'phone_home',
  1086                 'phone_mobile', 
'fax', 
'email', 
'second_email', 
'hobby',
  1087                 'matriculation', 
'location', 
'interests_general',
  1088                 'interests_help_offered', 
'interests_help_looking'];
  1092             foreach ($val_array as $key => $value) {
  1093                 if ($checked_values[
'chk_' . $value] ?? 
false) {
  1094                     $this->
user->setPref(
'public_' . $value, 
'y');
  1096                     $this->
user->setPref(
'public_' . $value, 
'n');
  1100             foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
  1101                 if ($checked_values[
'chk_udf_' . $definition[
'field_id']] ?? 
false) {
  1102                     $this->
user->setPref(
'public_udf_' . $definition[
'field_id'], 
'y');
  1104                     $this->
user->setPref(
'public_udf_' . $definition[
'field_id'], 
'n');
  1108             $this->
user->update();
  1110             switch ($this->
form->getInput(
'public_profile')) {
  1121                 $badgePositions = [];
  1122                 $bpos = $this->
form->getInput(
'bpos' . $key_suffix);
  1123                 if (isset($bpos) && is_array($bpos)) {
  1124                     $badgePositions = $bpos;
  1127                 if (count($badgePositions) > 0) {
  1135             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_obj_modified'), 
true);
  1137             $this->checklist_status->saveStepSucess(ChecklistStatus::STEP_PUBLISH_OPTIONS);
  1144                 $this->
ctrl->redirectByClass(
'iluserprivacysettingsgui', 
'');
  1147         $this->
form->setValuesByPost();
  1148         $this->tpl->showPublicProfile(
true);
  1154         switch ($this->
form->getInput(
'public_profile')) {
  1163         $checked_values = [];
  1164         $post = $this->profile_request->getParsedBody();
  1165         foreach (
$post as $k => $v) {
  1166             if (strpos($k, 
'chk_') !== 0) {
  1169             if (substr($k, -2) === $key_suffix) {
  1170                 $k = str_replace([
'-1', 
'-2'], 
'', $k);
  1172             $checked_values[$k] = $v;
  1174         foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
  1175             if (isset(
$post[
'chk_udf_' . $definition[
'field_id'] . $key_suffix])) {
  1176                 $checked_values[
'chk_udf_' . $definition[
'field_id']] = 
'1';
  1179         return $checked_values;
  1184         $this->
tabs->activateTab(
'export');
  1187         $button = $this->ui_factory->link()->standard(
  1188             $this->
lng->txt(
'pd_export_profile'),
  1189             $this->
ctrl->getLinkTarget($this, 
'exportPersonalData')
  1191         $this->
toolbar->addStickyItem($button);
  1193         $exp_file = $this->
user->getPersonalDataExportFile();
  1194         if ($exp_file != 
'') {
  1195             $this->
toolbar->addSeparator();
  1197                 $this->ui_factory->link()->standard(
  1198                     $this->
lng->txt(
"pd_download_last_export_file"),
  1199                     $this->
ctrl->getLinkTarget($this, 
"downloadPersonalData")
  1204         $this->
toolbar->addSeparator();
  1206             $this->ui_factory->link()->standard(
  1207                 $this->
lng->txt(
"pd_import_personal_data"),
  1208                 $this->
ctrl->getLinkTarget($this, 
"importPersonalDataSelection")
  1212         $this->tpl->printToStdout();
  1217         $this->
user->exportPersonalData();
  1218         $this->
user->sendPersonalDataFile();
  1219         $this->
ctrl->redirect($this, 
'showExportImport');
  1227         $this->
user->sendPersonalDataFile();
  1232         $this->
tabs->activateTab(
'export');
  1237         $this->tpl->setContent($this->
form->getHTML());
  1238         $this->tpl->printToStdout();
  1248         $fi->setSuffixes([
'zip']);
  1249         $this->
form->addItem($fi);
  1253         $this->
form->addItem($cb);
  1257         $this->
form->addItem($cb);
  1261         $this->
form->addItem($cb);
  1265         $this->
form->addItem($cb);
  1267         $this->
form->addCommandButton(
'importPersonalData', $this->
lng->txt(
'import'));
  1268         $this->
form->addCommandButton(
'showExportImport', $this->
lng->txt(
'cancel'));
  1270         $this->
form->setTitle($this->
lng->txt(
'pd_import_personal_data'));
  1271         $this->
form->setFormAction($this->
ctrl->getFormAction($this));
  1277         if ($this->
form->checkInput()) {
  1278             $this->
user->importPersonalData(
  1280                 (
bool) $this->
form->getInput(
'profile_data'),
  1281                 (bool) $this->
form->getInput(
'settings'),
  1282                 (bool) $this->
form->getInput(
'notes'),
  1283                 (bool) $this->
form->getInput(
'calendar')
  1285             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_obj_modified'), 
true);
  1286             $this->
ctrl->redirect($this, 
'');
  1288             $this->
tabs->activateTab(
'export');
  1290             $this->
form->setValuesByPost();
  1291             $this->tpl->setContent($this->
form->getHTML());
  1292             $this->tpl->printToStdout();
  1304         $capture = $this->profile_request->getUserFileCapture();
  1306         if ($capture !== 
'') {
  1307             $this->
form->getItemByPostVar(
'userfile')->setImage($capture);
  1309             $hidden_user_picture_carry->setValue($capture);
  1310             $this->
form->addItem($hidden_user_picture_carry);
 
ilUserDefinedFields $user_defined_fields
 
static get(string $a_var)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
GUIRequest $profile_request
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ilObjUser $user=null,)
 
static getLogger(string $a_component_id)
Get component logger. 
 
Personal profile publishing mode of a user. 
 
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()
 
$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. 
 
ChangeMailTokenRepository $change_mail_token_repo
 
static getDefaultPortfolio(int $a_user_id)
 
initPersonalDataImportForm()
 
withAdditionalOnLoadCode(Closure $binder)
 
PromptRepository $prompt_repository
 
ResourceStakeholder $stakeholder
 
__showOtherInformations()
 
workWithUserSetting(string $setting)
 
userSettingVisible(string $setting)
 
updateLoginOrSetErrorMessages()
 
showPublicProfile(bool $a_no_init=false)
 
ilAuthSession $auth_session
 
setBackUrl(string $backurl)
Set Back Link URL. 
 
ChecklistStatus $checklist_status
 
ilUserSettingsConfig $user_settings_config
 
const PERSONAL_DATA_FORM_ID
 
GUI class for public user profile presentation. 
 
StaticUrlServices $static_url
 
__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. 
 
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)
 
showPersonalData(bool $a_no_init=false)
 
static isActivated()
Checks whether Map feature is activated. 
 
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)
 
ilErrorHandling $error_handler
 
form( $class_path, string $cmd, string $submit_caption="")
 
ilGlobalTemplateInterface $tpl
 
showProfile()
show profile form 
 
static setClosingContext(int $a_context)
set closing context (for statistics) 
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
__construct(Container $dic, ilPlugin $plugin)
 
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='')
 
static set(string $a_var, $a_val)
Set a value. 
 
catch(ilCmiXapiException $e) send($response)