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());
492 if (!empty($this->password_error))
496 elseif (!empty($this->upload_error))
504 $this->ctrl->redirect($this,
"");
537 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
543 $this->lng->loadLanguageModule(
"gmaps");
551 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
554 $latitude = $def[
"latitude"];
555 $longitude = $def[
"longitude"];
556 $zoom = $def[
"zoom"];
562 $street = $this->lng->txt(
"street");
567 $city = $this->lng->txt(
"city");
572 $country = $this->lng->txt(
"country");
579 $loc_prop->setLongitude($longitude);
580 $loc_prop->setZoom($zoom);
581 $loc_prop->setAddress($street.
",".$city.
",".$country);
589 global $ilTabs,
$ilUser, $ilHelp;
591 $ilHelp->setScreenIdComponent(
"user");
594 $ilTabs->addTab(
"personal_data",
595 $this->lng->txt(
"personal_data"),
596 $this->ctrl->getLinkTarget($this,
"showPersonalData"));
599 $ilTabs->addTab(
"public_profile",
600 $this->lng->txt(
"public_profile"),
601 $this->ctrl->getLinkTarget($this,
"showPublicProfile"));
604 $ilTabs->addTab(
"export",
605 $this->lng->txt(
"export").
"/".$this->lng->txt(
"import"),
606 $this->ctrl->getLinkTarget($this,
"showExportImport"));
611 $ilTabs->addNonTabbedLink(
"profile_preview",
612 $this->lng->txt(
"user_profile_preview"),
613 $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"view"));
621 if($this->
userSettingVisible(
"matriculation") or count($this->user_defined_fields->getVisibleDefinitions())
622 or $d_set->get(
"user_profile") ==
"1")
633 $user_defined_data = $ilUser->getUserDefinedData();
634 foreach($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
638 $this->tpl->setCurrentBlock(
"field_text");
640 if(!$definition[
'changeable'])
642 $this->tpl->setVariable(
"DISABLED_FIELD",
'disabled=\"disabled\"');
643 $this->tpl->setVariable(
"FIELD_NAME",
'udf['.$definition[
'field_id'].
']');
647 $this->tpl->setVariable(
"FIELD_NAME",
'udf['.$definition[
'field_id'].
']');
649 $this->tpl->parseCurrentBlock();
653 if($definition[
'changeable'])
655 $name =
'udf['.$definition[
'field_id'].
']';
663 $this->tpl->setCurrentBlock(
"field_select");
664 $this->tpl->setVariable(
"SELECT_BOX",
ilUtil::formSelect($user_defined_data[$field_id],
666 $this->user_defined_fields->fieldValuesToSelectArray(
667 $definition[
'field_values']),
669 true,0,
'',
'',$disabled));
670 $this->tpl->parseCurrentBlock();
672 $this->tpl->setCurrentBlock(
"user_defined");
674 if($definition[
'required'])
676 $name = $definition[
'field_name'].
"<span class=\"asterisk\">*</span>";
680 $name = $definition[
'field_name'];
682 $this->tpl->setVariable(
"TXT_FIELD_NAME",$name);
683 $this->tpl->parseCurrentBlock();
690 foreach($this->user_defined_fields->getVisibleDefinitions() as $definition)
692 $field_id = $definition[
'field_id'];
693 if($definition[
'required'] and !strlen(
$_POST[
'udf'][$field_id]))
707 $this->tpl->setTitle($this->lng->txt(
'personal_profile'));
723 $ilTabs->activateTab(
"personal_data");
725 $settings = $ilias->getAllSettings();
733 if ($ilUser->getProfileIncomplete())
738 $this->tpl->setContent($this->form->getHTML());
750 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
752 $this->form->setFormAction($this->ctrl->getFormAction($this));
755 $user_defined_data = $ilUser->getUserDefinedData();
757 foreach($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
761 $this->input[
"udf_".$definition[
'field_id']] =
762 new ilTextInputGUI($definition[
'field_name'],
"udf_".$definition[
'field_id']);
763 $this->input[
"udf_".$definition[
'field_id']]->setMaxLength(255);
764 $this->input[
"udf_".$definition[
'field_id']]->setSize(40);
768 $this->input[
"udf_".$definition[
'field_id']] =
770 $this->input[
"udf_".$definition[
'field_id']]->setUseRte(
true);
774 $options = $this->user_defined_fields->fieldValuesToSelectArray($definition[
'field_values']);
775 $this->input[
"udf_".$definition[
'field_id']] =
776 new ilSelectInputGUI($definition[
'field_name'],
"udf_".$definition[
'field_id']);
777 $this->input[
"udf_".$definition[
'field_id']]->setOptions($options);
780 $value = $user_defined_data[
"f_".$field_id];
781 $this->input[
"udf_".$definition[
'field_id']]->setValue($value);
783 if($definition[
'required'])
785 $this->input[
"udf_".$definition[
'field_id']]->setRequired(
true);
787 if(!$definition[
'changeable'] && (!$definition[
'required'] || $value))
789 $this->input[
"udf_".$definition[
'field_id']]->setDisabled(
true);
795 $options = array(
""=>$lng->txt(
"please_select")) + $options;
796 $this->input[
"udf_".$definition[
'field_id']]->setOptions($options);
801 include_once(
"./Services/User/classes/class.ilUserProfile.php");
803 $up->skipField(
"password");
804 $up->skipGroup(
"settings");
805 $up->skipGroup(
"preferences");
808 $up->addStandardFieldsToForm($this->form, $ilUser, $this->input);
812 $this->form->addCommandButton(
"savePersonalData", $lng->txt(
"save"));
825 if ($this->form->checkInput())
831 "firstname" =>
"FirstName",
832 "lastname" =>
"LastName",
834 "sel_country" =>
"SelectedCountry",
835 "phone_office" =>
"PhoneOffice",
836 "phone_home" =>
"PhoneHome",
837 "phone_mobile" =>
"PhoneMobile",
838 "referral_comment" =>
"Comment"
840 include_once(
"./Services/User/classes/class.ilUserProfile.php");
842 foreach($up->getStandardFields() as $f => $p)
845 $item = $this->form->getItemByPostVar(
"usr_".$f);
846 if($item && !$item->getDisabled())
848 $value = $this->form->getInput(
"usr_".$f);
852 if (is_array($value))
854 if (is_array($value[
'date']))
856 if (($value[
'd'] > 0) && ($value[
'm'] > 0) && ($value[
'y'] > 0))
858 $ilUser->setBirthday(sprintf(
"%04d-%02d-%02d", $value[
'y'], $value[
'm'], $value[
'd']));
862 $ilUser->setBirthday(
"");
867 $ilUser->setBirthday($value[
'date']);
878 $ilUser->{
"set".$m}($value);
883 $ilUser->setFullname();
888 $ilUser->setInstantMessengerId(
'icq', $this->form->getInput(
"usr_im_icq"));
889 $ilUser->setInstantMessengerId(
'yahoo', $this->form->getInput(
"usr_im_yahoo"));
890 $ilUser->setInstantMessengerId(
'msn', $this->form->getInput(
"usr_im_msn"));
891 $ilUser->setInstantMessengerId(
'aim', $this->form->getInput(
"usr_im_aim"));
892 $ilUser->setInstantMessengerId(
'skype', $this->form->getInput(
"usr_im_skype"));
893 $ilUser->setInstantMessengerId(
'jabber', $this->form->getInput(
"usr_im_jabber"));
894 $ilUser->setInstantMessengerId(
'voip', $this->form->getInput(
"usr_im_voip"));
898 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
901 $location = $this->form->getInput(
"location");
908 $defs = $this->user_defined_fields->getVisibleDefinitions();
910 foreach ($defs as $definition)
912 $f =
"udf_".$definition[
'field_id'];
913 $item = $this->form->getItemByPostVar($f);
914 if ($item && !$item->getDisabled())
916 $udf[$definition[
'field_id']] = $this->form->getInput($f);
919 $ilUser->setUserDefinedData($udf);
922 $un = $this->form->getInput(
'username');
923 if((
int)$ilSetting->get(
'allow_change_loginname') &&
924 $un != $ilUser->getLogin())
929 $this->form->getItemByPostVar(
'username')->setAlert($this->lng->txt(
'login_invalid'));
935 $this->form->getItemByPostVar(
'username')->setAlert($this->lng->txt(
'loginname_already_exists'));
940 $ilUser->setLogin($un);
944 $ilUser->updateLogin($ilUser->getLogin());
945 $ilAuth->setAuth($ilUser->getLogin());
951 $this->form->getItemByPostVar(
'username')->setAlert($e->getMessage());
963 $ilUser->setProfileIncomplete(
false);
966 $ilUser->setTitle($ilUser->getFullname());
967 $ilUser->setDescription($ilUser->getEmail());
973 unset(
$_SESSION[
'profile_complete_redirect']);
977 $ilCtrl->redirect($this,
"showPersonalData");
981 $this->form->setValuesByPost();
994 function showPublicProfile($a_no_init =
false)
998 $ilTabs->activateTab(
"public_profile");
1004 $this->initPublicProfileForm();
1007 $ptpl =
new ilTemplate(
"tpl.edit_personal_profile.html",
true,
true,
"Services/User");
1008 $ptpl->setVariable(
"FORM", $this->form->getHTML());
1009 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
1011 $ptpl->setVariable(
"PREVIEW", $pub_profile->getEmbeddable());
1012 $this->tpl->setContent($ptpl->get());
1021 protected function getProfilePortfolio()
1025 if ($ilSetting->get(
'user_portfolios'))
1027 include_once
"Services/Portfolio/classes/class.ilObjPortfolio.php";
1037 public function initPublicProfileForm()
1041 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1044 $this->form->setTitle($lng->txt(
"public_profile"));
1045 $this->form->setDescription($lng->txt(
"user_public_profile_info"));
1046 $this->form->setFormAction($this->ctrl->getFormAction($this));
1048 $portfolio_id = $this->getProfilePortfolio();
1054 $info = $this->lng->txt(
"user_activate_public_profile_info");
1055 $pub_prof = in_array($ilUser->prefs[
"public_profile"], array(
"y",
"n",
"g"))
1056 ? $ilUser->prefs[
"public_profile"]
1058 if (!$ilSetting->get(
'enable_global_profiles') && $pub_prof ==
"g")
1063 $op1 =
new ilRadioOption($lng->txt(
"usr_public_profile_disabled"),
"n",$lng->txt(
"usr_public_profile_disabled_info"));
1064 $radg->addOption($op1);
1065 $op2 =
new ilRadioOption($lng->txt(
"usr_public_profile_logged_in"),
"y");
1066 $radg->addOption($op2);
1067 if ($ilSetting->get(
'enable_global_profiles'))
1069 $op3 =
new ilRadioOption($lng->txt(
"usr_public_profile_global"),
"g");
1070 $radg->addOption($op3);
1072 $this->form->addItem($radg);
1075 if ($ilSetting->get(
'user_portfolios'))
1078 $prtf =
"<br />".$lng->txt(
"user_profile_portfolio");
1079 $prtf .=
"<br /><a href=\"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToPortfolio\">» ".
1080 $lng->txt(
"user_portfolios").
"</a>";
1088 $prtf = $lng->txt(
"user_profile_portfolio_selected");
1089 $prtf .=
"<br /><a href=\"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToPortfolio&prt_id=".$portfolio_id.
"\">» ".
1090 $lng->txt(
"portfolio").
"</a>";
1093 $info->setHTML($prtf);
1094 $this->form->addItem($info);
1097 $this->showPublicProfileFields($this->form, $ilUser->prefs);
1099 $this->form->addCommandButton(
"savePublicProfile", $lng->txt(
"save"));
1109 public function showPublicProfileFields(ilPropertyformGUI $form, array $prefs, $parent = null)
1113 $birthday = $ilUser->getBirthday();
1118 $gender = $ilUser->getGender();
1121 $gender = $this->lng->txt(
"gender_".$gender);
1124 if ($ilUser->getSelectedCountry() !=
"")
1126 $this->lng->loadLanguageModule(
"meta");
1127 $txt_sel_country = $this->lng->txt(
"meta_c_".$ilUser->getSelectedCountry());
1134 $pic =
"<img src=\"".$pic.
"\" />";
1139 "title" => $ilUser->getUTitle(),
1140 "birthday" => $birthday,
1141 "gender" => $gender,
1142 "institution" => $ilUser->getInstitution(),
1143 "department" => $ilUser->getDepartment(),
1145 "street" => $ilUser->getStreet(),
1146 "zipcode" => $ilUser->getZipcode(),
1147 "city" => $ilUser->getCity(),
1148 "country" => $ilUser->getCountry(),
1149 "sel_country" => $txt_sel_country,
1150 "phone_office" => $ilUser->getPhoneOffice(),
1151 "phone_home" => $ilUser->getPhoneHome(),
1152 "phone_mobile" => $ilUser->getPhoneMobile(),
1153 "fax" => $ilUser->getFax(),
1154 "email" => $ilUser->getEmail(),
1155 "hobby" => $ilUser->getHobby(),
1156 "matriculation" => $ilUser->getMatriculation(),
1157 "delicious" => $ilUser->getDelicious()
1161 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
1164 $val_array[
"location"] =
"";
1167 foreach($val_array as $key => $value)
1169 if ($this->userSettingVisible($key))
1172 if ($key ==
"upload")
1180 if ($prefs[
"public_".$key] ==
"y")
1185 $cb->setOptionTitle($value);
1189 $form->addItem($cb);
1193 $parent->addSubItem($cb);
1198 $im_arr = array(
"icq",
"yahoo",
"msn",
"aim",
"skype",
"jabber",
"voip");
1199 if ($this->userSettingVisible(
"instant_messengers"))
1201 foreach ($im_arr as $im)
1207 if ($prefs[
"public_im_".$im] !=
"n")
1209 $cb->setChecked(
true);
1214 $form->addItem($cb);
1218 $parent->addSubItem($cb);
1224 $user_defined_data = $ilUser->getUserDefinedData();
1225 foreach($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
1228 $cb =
new ilCheckboxInputGUI($definition[
"field_name"],
"chk_udf_".$definition[
"field_id"]);
1229 $cb->setOptionTitle($user_defined_data[
"f_".$definition[
"field_id"]]);
1230 if ($prefs[
"public_udf_".$definition[
"field_id"]] ==
"y")
1232 $cb->setChecked(
true);
1237 $form->addItem($cb);
1241 $parent->addSubItem($cb);
1250 public function savePublicProfile()
1254 $this->initPublicProfileForm();
1255 if ($this->form->checkInput())
1258 if(isset(
$_POST[
"public_profile"]))
1260 $ilUser->setPref(
"public_profile",
$_POST[
"public_profile"]);
1264 $val_array = array(
"title",
"birthday",
"gender",
"institution",
"department",
"upload",
"street",
1265 "zipcode",
"city",
"country",
"sel_country",
"phone_office",
"phone_home",
"phone_mobile",
1266 "fax",
"email",
"hobby",
"matriculation",
"location");
1269 foreach($val_array as $key => $value)
1271 if ((
$_POST[
"chk_".$value]))
1273 $ilUser->setPref(
"public_".$value,
"y");
1277 $ilUser->setPref(
"public_".$value,
"n");
1281 $im_arr = array(
"icq",
"yahoo",
"msn",
"aim",
"skype",
"jabber",
"voip");
1282 if ($this->userSettingVisible(
"instant_messengers"))
1284 foreach ($im_arr as $im)
1286 if ((
$_POST[
"chk_im_".$im]))
1288 $ilUser->setPref(
"public_im_".$im,
"y");
1292 $ilUser->setPref(
"public_im_".$im,
"n");
1300 if ((
$_POST[
"chk_delicious"]))
1302 $ilUser->setPref(
"public_delicious",
"y");
1306 $ilUser->setPref(
"public_delicious",
"n");
1311 foreach($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
1313 if ((
$_POST[
"chk_udf_".$definition[
"field_id"]]))
1315 $ilUser->setPref(
"public_udf_".$definition[
"field_id"],
"y");
1319 $ilUser->setPref(
"public_udf_".$definition[
"field_id"],
"n");
1325 $ilCtrl->redirect($this,
"showPublicProfile");
1327 $this->form->setValuesByPost();
1328 $tpl->showPublicProfile(
true);
1337 function showExportImport()
1341 $ilTabs->activateTab(
"export");
1344 $ilToolbar->addButton($this->lng->txt(
"pd_export_profile"),
1345 $ilCtrl->getLinkTarget($this,
"exportPersonalData"));
1347 $exp_file = $ilUser->getPersonalDataExportFile();
1348 if ($exp_file !=
"")
1350 $ilToolbar->addSeparator();
1351 $ilToolbar->addButton($this->lng->txt(
"pd_download_last_export_file"),
1352 $ilCtrl->getLinkTarget($this,
"downloadPersonalData"));
1355 $ilToolbar->addSeparator();
1356 $ilToolbar->addButton($this->lng->txt(
"pd_import_personal_data"),
1357 $ilCtrl->getLinkTarget($this,
"importPersonalDataSelection"));
1366 function exportPersonalData()
1370 $ilUser->exportPersonalData();
1371 $ilUser->sendPersonalDataFile();
1372 $ilCtrl->redirect($this,
"showExportImport");
1381 function downloadPersonalData()
1385 $ilUser->sendPersonalDataFile();
1394 function importPersonalDataSelection()
1398 $ilTabs->activateTab(
"export");
1401 $this->initPersonalDataImportForm();
1403 $tpl->setContent($this->form->getHTML());
1413 function initPersonalDataImportForm()
1417 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1423 $fi->setSuffixes(array(
"zip"));
1424 $this->form->addItem($fi);
1428 $this->form->addItem($cb);
1432 $this->form->addItem($cb);
1436 $this->form->addItem($cb);
1440 $this->form->addItem($cb);
1444 $this->form->addItem($cb);
1446 $this->form->addCommandButton(
"importPersonalData", $lng->txt(
"import"));
1447 $this->form->addCommandButton(
"showExportImport", $lng->txt(
"cancel"));
1449 $this->form->
setTitle($lng->txt(
"pd_import_personal_data"));
1450 $this->form->setFormAction($ilCtrl->getFormAction($this));
1461 function importPersonalData()
1465 $this->initPersonalDataImportForm();
1466 if ($this->form->checkInput())
1468 $ilUser->importPersonalData($_FILES[
"file"],
1469 (
int)
$_POST[
"profile_data"],
1470 (
int) $_POST[
"settings"],
1471 (
int) $_POST[
"bookmarks"],
1472 (
int) $_POST[
"notes"],
1473 (
int) $_POST[
"calendar"]
1476 $ilCtrl->redirect($this,
"");
1480 $ilTabs->activateTab(
"export");
1482 $this->form->setValuesByPost();
1483 $tpl->setContent($this->form->getHtml());