29 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
36 $this->settings = $ilias->getAllSettings();
37 $lng->loadLanguageModule(
"jsmath");
38 $lng->loadLanguageModule(
"pd");
39 $this->upload_error =
"";
40 $this->password_error =
"";
41 $lng->loadLanguageModule(
"user");
52 $next_class = $this->ctrl->getNextClass();
56 case "ilpublicuserprofilegui":
57 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
58 $_GET[
"user_id"] = $ilUser->getId();
60 $pub_profile_gui->setBackUrl($ilCtrl->getLinkTarget($this,
"showPersonalData"));
61 $ilCtrl->forwardCommand($pub_profile_gui);
67 $cmd = $this->ctrl->getCmd(
"showPersonalData");
82 if ($this->settings[
"usr_settings_hide_".$setting] == 1)
86 if ($this->settings[
"usr_settings_disable_".$setting] == 1)
100 if (isset($this->settings[
"usr_settings_hide_".$setting]) &&
101 $this->settings[
"usr_settings_hide_".$setting] == 1)
115 if ($this->settings[
"usr_settings_disable_".$setting] == 1)
131 if (!$this->form->hasFileUpload(
"userfile"))
133 if ($this->form->getItemByPostVar(
"userfile")->getDeletionFlag())
135 $ilUser->removeUserPicture();
142 $image_dir = $webspace_dir.
"/usr_images";
143 $store_file =
"usr_".$ilUser->getID().
".".
"jpg";
146 $ilUser->setPref(
"profile_image", $store_file);
150 $uploaded_file = $this->form->moveFileUpload($image_dir,
151 "userfile",
"upload_".$ilUser->getId().
"pic");
156 $this->ctrl->redirect($this,
"showProfile");
158 chmod($uploaded_file, 0770);
162 $show_file =
"$image_dir/usr_".$ilUser->getId().
".jpg";
163 $thumb_file =
"$image_dir/usr_".$ilUser->getId().
"_small.jpg";
164 $xthumb_file =
"$image_dir/usr_".$ilUser->getId().
"_xsmall.jpg";
165 $xxthumb_file =
"$image_dir/usr_".$ilUser->getId().
"_xxsmall.jpg";
174 ilUtil::execConvert($uploaded_file .
"[0] -geometry 200x200^ -gravity center -extent 200x200 -quality 100 JPEG:".$show_file);
175 ilUtil::execConvert($uploaded_file .
"[0] -geometry 100x100^ -gravity center -extent 100x100 -quality 100 JPEG:".$thumb_file);
176 ilUtil::execConvert($uploaded_file .
"[0] -geometry 75x75^ -gravity center -extent 75x75 -quality 100 JPEG:".$xthumb_file);
177 ilUtil::execConvert($uploaded_file .
"[0] -geometry 30x30^ -gravity center -extent 30x30 -quality 100 JPEG:".$xxthumb_file);
181 ilUtil::execConvert($uploaded_file .
"[0] -geometry 200x200 -quality 100 JPEG:".$show_file);
182 ilUtil::execConvert($uploaded_file .
"[0] -geometry 100x100 -quality 100 JPEG:".$thumb_file);
183 ilUtil::execConvert($uploaded_file .
"[0] -geometry 75x75 -quality 100 JPEG:".$xthumb_file);
184 ilUtil::execConvert($uploaded_file .
"[0] -geometry 30x30 -quality 100 JPEG:".$xxthumb_file);
199 $ilUser->removeUserPicture();
220 if ((
$_POST[
"chk_pub"])==
"on")
222 $ilUser->setPref(
"public_profile",
"y");
226 $ilUser->setPref(
"public_profile",
"n");
230 $val_array = array(
"institution",
"department",
"upload",
"street",
231 "zip",
"city",
"country",
"phone_office",
"phone_home",
"phone_mobile",
232 "fax",
"email",
"hobby",
"matriculation");
235 foreach($val_array as $key => $value)
237 if ((
$_POST[
"chk_".$value]) ==
"on")
239 $ilUser->setPref(
"public_".$value,
"y");
243 $ilUser->setPref(
"public_".$value,
"n");
248 if ($d_set->get(
"user_profile"))
250 if ((
$_POST[
"chk_delicious"]) ==
"on")
252 $ilUser->setPref(
"public_delicious",
"y");
256 $ilUser->setPref(
"public_delicious",
"n");
262 foreach($this->settings as $key => $val)
264 if (substr($key,0,8) ==
"require_")
266 $require_keys[] = substr($key,8);
270 foreach($require_keys as $key => $val)
273 $system_fields = array(
"login",
"default_role",
"passwd",
"passwd2");
274 if (!in_array($val, $system_fields))
278 if (isset($this->settings[
"require_" . $val]) && $this->settings[
"require_" . $val])
280 if (empty(
$_POST[
"usr_" . $val]))
282 ilUtil::sendFailure($this->lng->txt(
"fill_out_all_required_fields") .
": " . $this->lng->txt($val));
318 $ilUser->setGender(
$_POST[
"usr_gender"]);
324 $ilUser->setFullname();
384 if ($d_set->get(
"user_profile"))
402 $ilUser->setUserDefinedData(
$_POST[
'udf']);
413 if (
$_POST[
"usr_skin_style"] !=
"")
415 $sknst = explode(
":",
$_POST[
"usr_skin_style"]);
417 if ($ilUser->getPref(
"style") != $sknst[1] ||
418 $ilUser->getPref(
"skin") != $sknst[0])
420 $ilUser->setPref(
"skin", $sknst[0]);
421 $ilUser->setPref(
"style", $sknst[1]);
432 if (
$_POST[
"usr_language"] != $ilUser->getLanguage())
438 $ilUser->setLanguage(
$_POST[
"usr_language"]);
444 if (
$_POST[
"hits_per_page"] !=
"")
446 $ilUser->setPref(
"hits_per_page",
$_POST[
"hits_per_page"]);
453 $ilUser->setPref(
"show_users_online",
$_POST[
"show_users_online"]);
459 if (
$_POST[
"chk_hide_own_online_status"] !=
"")
461 $ilUser->setPref(
"hide_own_online_status",
"y");
465 $ilUser->setPref(
"hide_own_online_status",
"n");
482 $ilUser->setProfileIncomplete(
false);
485 $ilUser->setTitle($ilUser->getFullname());
486 $ilUser->setDescription($ilUser->getEmail());
491 include_once
'./Services/Search/classes/Lucene/class.ilLuceneIndexer.php';
497 if (!empty($this->password_error))
501 elseif (!empty($this->upload_error))
509 $this->ctrl->redirect($this,
"");
542 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
548 $this->lng->loadLanguageModule(
"gmaps");
556 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
559 $latitude = $def[
"latitude"];
560 $longitude = $def[
"longitude"];
561 $zoom = $def[
"zoom"];
567 $street = $this->lng->txt(
"street");
572 $city = $this->lng->txt(
"city");
577 $country = $this->lng->txt(
"country");
584 $loc_prop->setLongitude($longitude);
585 $loc_prop->setZoom($zoom);
586 $loc_prop->setAddress($street.
",".$city.
",".$country);
594 global $ilTabs,
$ilUser, $ilHelp;
596 $ilHelp->setScreenIdComponent(
"user");
599 $ilTabs->addTab(
"personal_data",
600 $this->lng->txt(
"personal_data"),
601 $this->ctrl->getLinkTarget($this,
"showPersonalData"));
604 $ilTabs->addTab(
"public_profile",
605 $this->lng->txt(
"public_profile"),
606 $this->ctrl->getLinkTarget($this,
"showPublicProfile"));
609 $ilTabs->addTab(
"export",
610 $this->lng->txt(
"export").
"/".$this->lng->txt(
"import"),
611 $this->ctrl->getLinkTarget($this,
"showExportImport"));
616 $ilTabs->addNonTabbedLink(
"profile_preview",
617 $this->lng->txt(
"user_profile_preview"),
618 $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"view"));
626 if($this->
userSettingVisible(
"matriculation") or count($this->user_defined_fields->getVisibleDefinitions())
627 or $d_set->get(
"user_profile") ==
"1")
638 $user_defined_data = $ilUser->getUserDefinedData();
639 foreach($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
643 $this->tpl->setCurrentBlock(
"field_text");
645 if(!$definition[
'changeable'])
647 $this->tpl->setVariable(
"DISABLED_FIELD",
'disabled=\"disabled\"');
648 $this->tpl->setVariable(
"FIELD_NAME",
'udf['.$definition[
'field_id'].
']');
652 $this->tpl->setVariable(
"FIELD_NAME",
'udf['.$definition[
'field_id'].
']');
654 $this->tpl->parseCurrentBlock();
658 if($definition[
'changeable'])
660 $name =
'udf['.$definition[
'field_id'].
']';
668 $this->tpl->setCurrentBlock(
"field_select");
669 $this->tpl->setVariable(
"SELECT_BOX",
ilUtil::formSelect($user_defined_data[$field_id],
671 $this->user_defined_fields->fieldValuesToSelectArray(
672 $definition[
'field_values']),
674 true,0,
'',
'',$disabled));
675 $this->tpl->parseCurrentBlock();
677 $this->tpl->setCurrentBlock(
"user_defined");
679 if($definition[
'required'])
681 $name = $definition[
'field_name'].
"<span class=\"asterisk\">*</span>";
685 $name = $definition[
'field_name'];
687 $this->tpl->setVariable(
"TXT_FIELD_NAME",$name);
688 $this->tpl->parseCurrentBlock();
695 foreach($this->user_defined_fields->getVisibleDefinitions() as $definition)
697 $field_id = $definition[
'field_id'];
698 if($definition[
'required'] and !strlen(
$_POST[
'udf'][$field_id]))
712 $this->tpl->setTitle($this->lng->txt(
'personal_profile'));
728 $ilTabs->activateTab(
"personal_data");
730 $settings = $ilias->getAllSettings();
738 if ($ilUser->getProfileIncomplete())
743 $this->tpl->setContent($this->form->getHTML());
755 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
757 $this->form->setFormAction($this->ctrl->getFormAction($this));
760 $user_defined_data = $ilUser->getUserDefinedData();
762 foreach($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
766 $this->input[
"udf_".$definition[
'field_id']] =
767 new ilTextInputGUI($definition[
'field_name'],
"udf_".$definition[
'field_id']);
768 $this->input[
"udf_".$definition[
'field_id']]->setMaxLength(255);
769 $this->input[
"udf_".$definition[
'field_id']]->setSize(40);
773 $this->input[
"udf_".$definition[
'field_id']] =
775 $this->input[
"udf_".$definition[
'field_id']]->setUseRte(
true);
779 $options = $this->user_defined_fields->fieldValuesToSelectArray($definition[
'field_values']);
780 $this->input[
"udf_".$definition[
'field_id']] =
781 new ilSelectInputGUI($definition[
'field_name'],
"udf_".$definition[
'field_id']);
782 $this->input[
"udf_".$definition[
'field_id']]->setOptions(
$options);
785 $value = $user_defined_data[
"f_".$field_id];
786 $this->input[
"udf_".$definition[
'field_id']]->setValue($value);
788 if($definition[
'required'])
790 $this->input[
"udf_".$definition[
'field_id']]->setRequired(
true);
792 if(!$definition[
'changeable'] && (!$definition[
'required'] || $value))
794 $this->input[
"udf_".$definition[
'field_id']]->setDisabled(
true);
801 $this->input[
"udf_".$definition[
'field_id']]->setOptions(
$options);
806 include_once(
"./Services/User/classes/class.ilUserProfile.php");
808 $up->skipField(
"password");
809 $up->skipGroup(
"settings");
810 $up->skipGroup(
"preferences");
813 $up->addStandardFieldsToForm($this->form, $ilUser, $this->input);
817 $this->form->addCommandButton(
"savePersonalData", $lng->txt(
"save"));
830 if ($this->form->checkInput())
836 "firstname" =>
"FirstName",
837 "lastname" =>
"LastName",
839 "sel_country" =>
"SelectedCountry",
840 "phone_office" =>
"PhoneOffice",
841 "phone_home" =>
"PhoneHome",
842 "phone_mobile" =>
"PhoneMobile",
843 "referral_comment" =>
"Comment"
845 include_once(
"./Services/User/classes/class.ilUserProfile.php");
847 foreach($up->getStandardFields() as $f => $p)
850 $item = $this->form->getItemByPostVar(
"usr_".$f);
851 if($item && !$item->getDisabled())
853 $value = $this->form->getInput(
"usr_".$f);
857 if (is_array($value))
859 if (is_array($value[
'date']))
861 if (($value[
'd'] > 0) && ($value[
'm'] > 0) && ($value[
'y'] > 0))
863 $ilUser->setBirthday(sprintf(
"%04d-%02d-%02d", $value[
'y'], $value[
'm'], $value[
'd']));
867 $ilUser->setBirthday(
"");
872 $ilUser->setBirthday($value[
'date']);
883 $ilUser->{
"set".$m}($value);
888 $ilUser->setFullname();
893 $ilUser->setInstantMessengerId(
'icq', $this->form->getInput(
"usr_im_icq"));
894 $ilUser->setInstantMessengerId(
'yahoo', $this->form->getInput(
"usr_im_yahoo"));
895 $ilUser->setInstantMessengerId(
'msn', $this->form->getInput(
"usr_im_msn"));
896 $ilUser->setInstantMessengerId(
'aim', $this->form->getInput(
"usr_im_aim"));
897 $ilUser->setInstantMessengerId(
'skype', $this->form->getInput(
"usr_im_skype"));
898 $ilUser->setInstantMessengerId(
'jabber', $this->form->getInput(
"usr_im_jabber"));
899 $ilUser->setInstantMessengerId(
'voip', $this->form->getInput(
"usr_im_voip"));
903 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
906 $location = $this->form->getInput(
"location");
913 $defs = $this->user_defined_fields->getVisibleDefinitions();
915 foreach ($defs as $definition)
917 $f =
"udf_".$definition[
'field_id'];
918 $item = $this->form->getItemByPostVar($f);
919 if ($item && !$item->getDisabled())
921 $udf[$definition[
'field_id']] = $this->form->getInput($f);
924 $ilUser->setUserDefinedData($udf);
927 $un = $this->form->getInput(
'username');
928 if((
int)$ilSetting->get(
'allow_change_loginname') &&
929 $un != $ilUser->getLogin())
934 $this->form->getItemByPostVar(
'username')->setAlert($this->lng->txt(
'login_invalid'));
940 $this->form->getItemByPostVar(
'username')->setAlert($this->lng->txt(
'loginname_already_exists'));
945 $ilUser->setLogin($un);
949 $ilUser->updateLogin($ilUser->getLogin());
950 $ilAuth->setAuth($ilUser->getLogin());
956 $this->form->getItemByPostVar(
'username')->setAlert($e->getMessage());
968 $ilUser->setProfileIncomplete(
false);
971 $ilUser->setTitle($ilUser->getFullname());
972 $ilUser->setDescription($ilUser->getEmail());
986 unset(
$_SESSION[
'profile_complete_redirect']);
991 $ilCtrl->redirect($this,
"showPersonalData");
996 $this->form->setValuesByPost();
1009 function showPublicProfile($a_no_init =
false)
1013 $ilTabs->activateTab(
"public_profile");
1019 $this->initPublicProfileForm();
1022 $ptpl =
new ilTemplate(
"tpl.edit_personal_profile.html",
true,
true,
"Services/User");
1023 $ptpl->setVariable(
"FORM", $this->form->getHTML());
1024 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
1026 $ptpl->setVariable(
"PREVIEW", $pub_profile->getEmbeddable());
1027 $this->tpl->setContent($ptpl->get());
1036 protected function getProfilePortfolio()
1040 if ($ilSetting->get(
'user_portfolios'))
1042 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
1052 public function initPublicProfileForm()
1056 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1059 $this->form->setTitle($lng->txt(
"public_profile"));
1060 $this->form->setDescription($lng->txt(
"user_public_profile_info"));
1061 $this->form->setFormAction($this->ctrl->getFormAction($this));
1063 $portfolio_id = $this->getProfilePortfolio();
1069 $info = $this->lng->txt(
"user_activate_public_profile_info");
1070 $pub_prof = in_array($ilUser->prefs[
"public_profile"], array(
"y",
"n",
"g"))
1071 ? $ilUser->prefs[
"public_profile"]
1073 if (!$ilSetting->get(
'enable_global_profiles') && $pub_prof ==
"g")
1078 $op1 =
new ilRadioOption($lng->txt(
"usr_public_profile_disabled"),
"n",$lng->txt(
"usr_public_profile_disabled_info"));
1079 $radg->addOption($op1);
1080 $op2 =
new ilRadioOption($lng->txt(
"usr_public_profile_logged_in"),
"y");
1081 $radg->addOption($op2);
1082 if ($ilSetting->get(
'enable_global_profiles'))
1084 $op3 =
new ilRadioOption($lng->txt(
"usr_public_profile_global"),
"g");
1085 $radg->addOption($op3);
1087 $this->form->addItem($radg);
1090 if ($ilSetting->get(
'user_portfolios'))
1093 $prtf =
"<br />".$lng->txt(
"user_profile_portfolio");
1094 $prtf .=
"<br /><a href=\"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToPortfolio\">» ".
1095 $lng->txt(
"user_portfolios").
"</a>";
1103 $prtf = $lng->txt(
"user_profile_portfolio_selected");
1104 $prtf .=
"<br /><a href=\"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToPortfolio&prt_id=".$portfolio_id.
"\">» ".
1105 $lng->txt(
"portfolio").
"</a>";
1108 $info->setHTML($prtf);
1109 $this->form->addItem($info);
1112 $this->showPublicProfileFields($this->form, $ilUser->prefs);
1114 $this->form->addCommandButton(
"savePublicProfile", $lng->txt(
"save"));
1125 public function showPublicProfileFields(ilPropertyformGUI $form, array $prefs, $parent = null, $anonymized =
false)
1129 $birthday = $ilUser->getBirthday();
1134 $gender = $ilUser->getGender();
1137 $gender = $this->lng->txt(
"gender_".$gender);
1140 if ($ilUser->getSelectedCountry() !=
"")
1142 $this->lng->loadLanguageModule(
"meta");
1143 $txt_sel_country = $this->lng->txt(
"meta_c_".$ilUser->getSelectedCountry());
1150 $pic =
"<img src=\"".$pic.
"\" />";
1155 "title" => $ilUser->getUTitle(),
1156 "birthday" => $birthday,
1157 "gender" => $gender,
1158 "institution" => $ilUser->getInstitution(),
1159 "department" => $ilUser->getDepartment(),
1161 "street" => $ilUser->getStreet(),
1162 "zipcode" => $ilUser->getZipcode(),
1163 "city" => $ilUser->getCity(),
1164 "country" => $ilUser->getCountry(),
1165 "sel_country" => $txt_sel_country,
1166 "phone_office" => $ilUser->getPhoneOffice(),
1167 "phone_home" => $ilUser->getPhoneHome(),
1168 "phone_mobile" => $ilUser->getPhoneMobile(),
1169 "fax" => $ilUser->getFax(),
1170 "email" => $ilUser->getEmail(),
1171 "hobby" => $ilUser->getHobby(),
1172 "matriculation" => $ilUser->getMatriculation(),
1173 "delicious" => $ilUser->getDelicious()
1177 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
1180 $val_array[
"location"] =
"";
1183 foreach($val_array as $key => $value)
1190 if ($this->userSettingVisible($key))
1193 if ($key ==
"upload")
1201 if ($prefs[
"public_".$key] ==
"y")
1206 $cb->setOptionTitle($value);
1210 $form->addItem($cb);
1214 $parent->addSubItem($cb);
1219 $im_arr = array(
"icq",
"yahoo",
"msn",
"aim",
"skype",
"jabber",
"voip");
1220 if ($this->userSettingVisible(
"instant_messengers"))
1222 foreach ($im_arr as $im)
1228 if ($prefs[
"public_im_".$im] !=
"n")
1230 $cb->setChecked(
true);
1235 $form->addItem($cb);
1239 $parent->addSubItem($cb);
1245 $user_defined_data = array();
1248 $user_defined_data = $ilUser->getUserDefinedData();
1250 foreach($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
1253 $cb =
new ilCheckboxInputGUI($definition[
"field_name"],
"chk_udf_".$definition[
"field_id"]);
1254 $cb->setOptionTitle($user_defined_data[
"f_".$definition[
"field_id"]]);
1255 if ($prefs[
"public_udf_".$definition[
"field_id"]] ==
"y")
1257 $cb->setChecked(
true);
1262 $form->addItem($cb);
1266 $parent->addSubItem($cb);
1275 public function savePublicProfile()
1279 $this->initPublicProfileForm();
1280 if ($this->form->checkInput())
1283 if(isset(
$_POST[
"public_profile"]))
1285 $ilUser->setPref(
"public_profile",
$_POST[
"public_profile"]);
1289 $val_array = array(
"title",
"birthday",
"gender",
"institution",
"department",
"upload",
"street",
1290 "zipcode",
"city",
"country",
"sel_country",
"phone_office",
"phone_home",
"phone_mobile",
1291 "fax",
"email",
"hobby",
"matriculation",
"location");
1294 foreach($val_array as $key => $value)
1296 if ((
$_POST[
"chk_".$value]))
1298 $ilUser->setPref(
"public_".$value,
"y");
1302 $ilUser->setPref(
"public_".$value,
"n");
1306 $im_arr = array(
"icq",
"yahoo",
"msn",
"aim",
"skype",
"jabber",
"voip");
1307 if ($this->userSettingVisible(
"instant_messengers"))
1309 foreach ($im_arr as $im)
1311 if ((
$_POST[
"chk_im_".$im]))
1313 $ilUser->setPref(
"public_im_".$im,
"y");
1317 $ilUser->setPref(
"public_im_".$im,
"n");
1325 if ((
$_POST[
"chk_delicious"]))
1327 $ilUser->setPref(
"public_delicious",
"y");
1331 $ilUser->setPref(
"public_delicious",
"n");
1336 foreach($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
1338 if ((
$_POST[
"chk_udf_".$definition[
"field_id"]]))
1340 $ilUser->setPref(
"public_udf_".$definition[
"field_id"],
"y");
1344 $ilUser->setPref(
"public_udf_".$definition[
"field_id"],
"n");
1351 include_once
'./Services/Search/classes/Lucene/class.ilLuceneIndexer.php';
1355 $ilCtrl->redirect($this,
"showPublicProfile");
1357 $this->form->setValuesByPost();
1358 $tpl->showPublicProfile(
true);
1367 function showExportImport()
1371 $ilTabs->activateTab(
"export");
1374 $ilToolbar->addButton($this->lng->txt(
"pd_export_profile"),
1375 $ilCtrl->getLinkTarget($this,
"exportPersonalData"));
1377 $exp_file = $ilUser->getPersonalDataExportFile();
1378 if ($exp_file !=
"")
1380 $ilToolbar->addSeparator();
1381 $ilToolbar->addButton($this->lng->txt(
"pd_download_last_export_file"),
1382 $ilCtrl->getLinkTarget($this,
"downloadPersonalData"));
1385 $ilToolbar->addSeparator();
1386 $ilToolbar->addButton($this->lng->txt(
"pd_import_personal_data"),
1387 $ilCtrl->getLinkTarget($this,
"importPersonalDataSelection"));
1396 function exportPersonalData()
1400 $ilUser->exportPersonalData();
1401 $ilUser->sendPersonalDataFile();
1402 $ilCtrl->redirect($this,
"showExportImport");
1411 function downloadPersonalData()
1415 $ilUser->sendPersonalDataFile();
1424 function importPersonalDataSelection()
1428 $ilTabs->activateTab(
"export");
1431 $this->initPersonalDataImportForm();
1433 $tpl->setContent($this->form->getHTML());
1443 function initPersonalDataImportForm()
1447 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1453 $fi->setSuffixes(array(
"zip"));
1454 $this->form->addItem($fi);
1458 $this->form->addItem($cb);
1462 $this->form->addItem($cb);
1466 $this->form->addItem($cb);
1470 $this->form->addItem($cb);
1474 $this->form->addItem($cb);
1476 $this->form->addCommandButton(
"importPersonalData", $lng->txt(
"import"));
1477 $this->form->addCommandButton(
"showExportImport", $lng->txt(
"cancel"));
1479 $this->form->
setTitle($lng->txt(
"pd_import_personal_data"));
1480 $this->form->setFormAction($ilCtrl->getFormAction($this));
1491 function importPersonalData()
1495 $this->initPersonalDataImportForm();
1496 if ($this->form->checkInput())
1498 $ilUser->importPersonalData($_FILES[
"file"],
1499 (
int)
$_POST[
"profile_data"],
1500 (
int) $_POST[
"settings"],
1501 (
int) $_POST[
"bookmarks"],
1502 (
int) $_POST[
"notes"],
1503 (
int) $_POST[
"calendar"]
1506 $ilCtrl->redirect($this,
"");
1510 $ilTabs->activateTab(
"export");
1512 $this->form->setValuesByPost();
1513 $tpl->setContent($this->form->getHtml());