34        include_once 
'./Services/User/classes/class.ilUserDefinedFields.php';
 
   41        $this->tabs = $ilTabs;
 
   42        $this->
settings = $ilias->getAllSettings();
 
   43        $lng->loadLanguageModule(
"jsmath");
 
   44        $lng->loadLanguageModule(
"pd");
 
   45        $this->upload_error = 
"";
 
   46        $this->password_error = 
"";
 
   47        $lng->loadLanguageModule(
"user");
 
   58        $next_class = $this->ctrl->getNextClass();
 
   60        switch ($next_class) {
 
   61            case "ilpublicuserprofilegui":
 
   62                include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
 
   65                $pub_profile_gui->setBackUrl(
$ilCtrl->getLinkTarget($this, 
"showPersonalData"));
 
   66                $ilCtrl->forwardCommand($pub_profile_gui);
 
   72                $cmd = $this->ctrl->getCmd(
"showPersonalData");
 
   87        if ($this->
settings[
"usr_settings_hide_" . $setting] == 1) {
 
   90        if ($this->
settings[
"usr_settings_disable_" . $setting] == 1) {
 
  103        if (isset($this->
settings[
"usr_settings_hide_" . $setting]) &&
 
  104            $this->
settings[
"usr_settings_hide_" . $setting] == 1) {
 
  117        if ($this->
settings[
"usr_settings_disable_" . $setting] == 1) {
 
  131            if (!$this->form->hasFileUpload(
"userfile")) {
 
  132                if ($this->form->getItemByPostVar(
"userfile")->getDeletionFlag()) {
 
  138                $image_dir = $webspace_dir . 
"/usr_images";
 
  139                $store_file = 
"usr_" . 
$ilUser->getID() . 
"." . 
"jpg";
 
  142                $ilUser->setPref(
"profile_image", $store_file);
 
  147                $pi = pathinfo($_FILES[
"userfile"][
"name"]);
 
  148                $uploaded_file = $this->form->moveFileUpload(
 
  151                    "upload_" . 
$ilUser->getId() . 
"." . $pi[
"extension"]
 
  153                if (!$uploaded_file) {
 
  155                    $this->ctrl->redirect($this, 
"showProfile");
 
  157                chmod($uploaded_file, 0770);
 
  161                $show_file  = 
"$image_dir/usr_" . 
$ilUser->getId() . 
".jpg";
 
  162                $thumb_file = 
"$image_dir/usr_" . 
$ilUser->getId() . 
"_small.jpg";
 
  163                $xthumb_file = 
"$image_dir/usr_" . 
$ilUser->getId() . 
"_xsmall.jpg";
 
  164                $xxthumb_file = 
"$image_dir/usr_" . 
$ilUser->getId() . 
"_xxsmall.jpg";
 
  172                    ilUtil::execConvert($uploaded_file . 
"[0] -geometry 200x200^ -gravity center -extent 200x200 -quality 100 JPEG:" . $show_file);
 
  173                    ilUtil::execConvert($uploaded_file . 
"[0] -geometry 100x100^ -gravity center -extent 100x100 -quality 100 JPEG:" . $thumb_file);
 
  174                    ilUtil::execConvert($uploaded_file . 
"[0] -geometry 75x75^ -gravity center -extent 75x75 -quality 100 JPEG:" . $xthumb_file);
 
  175                    ilUtil::execConvert($uploaded_file . 
"[0] -geometry 30x30^ -gravity center -extent 30x30 -quality 100 JPEG:" . $xxthumb_file);
 
  177                    ilUtil::execConvert($uploaded_file . 
"[0] -geometry 200x200 -quality 100 JPEG:" . $show_file);
 
  178                    ilUtil::execConvert($uploaded_file . 
"[0] -geometry 100x100 -quality 100 JPEG:" . $thumb_file);
 
  179                    ilUtil::execConvert($uploaded_file . 
"[0] -geometry 75x75 -quality 100 JPEG:" . $xthumb_file);
 
  180                    ilUtil::execConvert($uploaded_file . 
"[0] -geometry 30x30 -quality 100 JPEG:" . $xxthumb_file);
 
  216        if ((
$_POST[
"chk_pub"])==
"on") {
 
  217            $ilUser->setPref(
"public_profile", 
"y");
 
  219            $ilUser->setPref(
"public_profile", 
"n");
 
  223        $val_array = array(
"institution", 
"department", 
"upload", 
"street",
 
  224            "zip", 
"city", 
"country", 
"phone_office", 
"phone_home", 
"phone_mobile",
 
  225            "fax", 
"email", 
"second_email", 
"hobby", 
"matriculation");
 
  228        foreach ($val_array as 
$key => $value) {
 
  229            if ((
$_POST[
"chk_" . $value]) == 
"on") {
 
  230                $ilUser->setPref(
"public_" . $value, 
"y");
 
  232                $ilUser->setPref(
"public_" . $value, 
"n");
 
  238            if (substr(
$key, 0, 8) == 
"require_") {
 
  239                $require_keys[] = substr(
$key, 8);
 
  243        foreach ($require_keys as 
$key => $val) {
 
  245            $system_fields = array(
"login", 
"default_role", 
"passwd", 
"passwd2");
 
  246            if (!in_array($val, $system_fields)) {
 
  248                    if (isset($this->
settings[
"require_" . $val]) && $this->
settings[
"require_" . $val]) {
 
  249                        if (empty(
$_POST[
"usr_" . $val])) {
 
  250                            ilUtil::sendFailure($this->lng->txt(
"fill_out_all_required_fields") . 
": " . $this->lng->txt($val));
 
  287            $ilUser->setGender(
$_POST[
"usr_gender"]);
 
  349                if (
$_POST[
"usr_skin_style"] != 
"") {
 
  350                    $sknst = explode(
":", 
$_POST[
"usr_skin_style"]);
 
  352                    if (
$ilUser->getPref(
"style") != $sknst[1] ||
 
  353                        $ilUser->getPref(
"skin") != $sknst[0]) {
 
  354                        $ilUser->setPref(
"skin", $sknst[0]);
 
  355                        $ilUser->setPref(
"style", $sknst[1]);
 
  365                if (
$_POST[
"usr_language"] != $ilUser->getLanguage()) {
 
  374                if (
$_POST[
"hits_per_page"] != 
"") {
 
  375                    $ilUser->setPref(
"hits_per_page", 
$_POST[
"hits_per_page"]);
 
  387                if (
$_POST[
"chk_hide_own_online_status"] != 
"") {
 
  388                    $ilUser->setPref(
"hide_own_online_status", 
"y");
 
  390                    $ilUser->setPref(
"hide_own_online_status", 
"n");
 
  407            $ilUser->setProfileIncomplete(
false);
 
  416            include_once 
'./Services/Search/classes/Lucene/class.ilLuceneIndexer.php';
 
  422            if (!empty($this->password_error)) {
 
  424            } elseif (!empty($this->upload_error)) {
 
  429                $this->ctrl->redirect($this, 
"");
 
  453        $this->tabs->clearTargets();
 
  454        $this->tabs->clearSubTabs();
 
  456        $this->tpl->setTitle($this->lng->txt(
'usr_agreement'));
 
  458        $tpl = new \ilTemplate(
'tpl.view_terms_of_service.html', 
true, 
true, 
'Services/Init');
 
  461        if ($document->exists()) {
 
  462            $tpl->setVariable(
'TERMS_OF_SERVICE_CONTENT', $document->getContent());
 
  465                'TERMS_OF_SERVICE_CONTENT',
 
  467                    $this->lng->txt(
'no_agreement_description'),
 
  473        $this->tpl->setContent(
$tpl->get());
 
  475        $this->tpl->setPermanentLink(
'usr', 
null, 
'agreement');
 
  490        include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
 
  496        $this->lng->loadLanguageModule(
"maps");
 
  504        if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
 
  506            $latitude = 
$def[
"latitude"];
 
  507            $longitude = 
$def[
"longitude"];
 
  508            $zoom =  
$def[
"zoom"];
 
  513            $street = $this->lng->txt(
"street");
 
  517            $city = $this->lng->txt(
"city");
 
  521            $country = $this->lng->txt(
"country");
 
  526            $this->lng->txt(
"location"),
 
  529        $loc_prop->setLatitude($latitude);
 
  530        $loc_prop->setLongitude($longitude);
 
  531        $loc_prop->setZoom($zoom);
 
  532        $loc_prop->setAddress($street . 
"," . $city . 
"," . $country);
 
  540        global $ilTabs, 
$ilUser, $ilHelp;
 
  542        $ilHelp->setScreenIdComponent(
"user");
 
  547            $this->lng->txt(
"personal_data"),
 
  548            $this->ctrl->getLinkTarget($this, 
"showPersonalData")
 
  554            $this->lng->txt(
"public_profile"),
 
  555            $this->ctrl->getLinkTarget($this, 
"showPublicProfile")
 
  561            $this->lng->txt(
"export") . 
"/" . $this->lng->txt(
"import"),
 
  562            $this->ctrl->getLinkTarget($this, 
"showExportImport")
 
  566        if ((
$ilUser->getPref(
"public_profile") &&
 
  567            $ilUser->getPref(
"public_profile") != 
"n") ||
 
  568            $this->getProfilePortfolio()) {
 
  570            $ilTabs->addNonTabbedLink(
 
  572                $this->lng->txt(
"user_profile_preview"),
 
  573                $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui", 
"view")
 
  582        if ($this->
userSettingVisible(
"matriculation") or count($this->user_defined_fields->getVisibleDefinitions())
 
  583            or $d_set->get(
"user_profile") == 
"1") {
 
  593        $user_defined_data = 
$ilUser->getUserDefinedData();
 
  594        foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
 
  596                $this->tpl->setCurrentBlock(
"field_text");
 
  598                if (!$definition[
'changeable']) {
 
  599                    $this->tpl->setVariable(
"DISABLED_FIELD", 
'disabled=\"disabled\"');
 
  600                    $this->tpl->setVariable(
"FIELD_NAME", 
'udf[' . $definition[
'field_id'] . 
']');
 
  602                    $this->tpl->setVariable(
"FIELD_NAME", 
'udf[' . $definition[
'field_id'] . 
']');
 
  604                $this->tpl->parseCurrentBlock();
 
  606                if ($definition[
'changeable']) {
 
  607                    $name = 
'udf[' . $definition[
'field_id'] . 
']';
 
  613                $this->tpl->setCurrentBlock(
"field_select");
 
  615                    $user_defined_data[$field_id],
 
  617                    $this->user_defined_fields->fieldValuesToSelectArray(
 
  618                        $definition[
'field_values']
 
  627                $this->tpl->parseCurrentBlock();
 
  629            $this->tpl->setCurrentBlock(
"user_defined");
 
  631            if ($definition[
'required']) {
 
  632                $name = $definition[
'field_name'] . 
"<span class=\"asterisk\">*</span>";
 
  634                $name = $definition[
'field_name'];
 
  636            $this->tpl->setVariable(
"TXT_FIELD_NAME", 
$name);
 
  637            $this->tpl->parseCurrentBlock();
 
  644        foreach ($this->user_defined_fields->getVisibleDefinitions() as $definition) {
 
  645            $field_id = $definition[
'field_id'];
 
  646            if ($definition[
'required'] and !strlen(
$_POST[
'udf'][$field_id])) {
 
  658        $this->tpl->setTitle($this->lng->txt(
'personal_profile'));
 
  674        $ilTabs->activateTab(
"personal_data");
 
  678        $it = $setting->get(
"user_profile_info_" . 
$ilUser->getLanguage());
 
  679        if (trim($it) != 
"") {
 
  680            $pub_prof = in_array(
$ilUser->prefs[
"public_profile"], array(
"y", 
"n", 
"g"))
 
  681                ? 
$ilUser->prefs[
"public_profile"]
 
  683            if ($pub_prof == 
"n") {
 
  684                $button = 
$DIC->ui()->factory()->button()->shy(
 
  685                    "» " . 
$lng->txt(
"user_make_profile_public"),
 
  686                    $ctrl->getLinkTarget($this, 
"showPublicProfile")
 
  688                $it.= 
"<br><br>" . 
$DIC->ui()->renderer()->render($button);
 
  699            if ($ilUser->getProfileIncomplete()) {
 
  703        $this->tpl->setContent($this->form->getHTML());
 
  715        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  717        $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  720        $user_defined_data = 
$ilUser->getUserDefinedData();
 
  722        foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
 
  724                $this->input[
"udf_" . $definition[
'field_id']] =
 
  725                    new ilTextInputGUI($definition[
'field_name'], 
"udf_" . $definition[
'field_id']);
 
  726                $this->input[
"udf_" . $definition[
'field_id']]->setMaxLength(255);
 
  727                $this->input[
"udf_" . $definition[
'field_id']]->setSize(40);
 
  729                $this->input[
"udf_" . $definition[
'field_id']] =
 
  731                $this->input[
"udf_" . $definition[
'field_id']]->setUseRte(
true);
 
  733                $options = $this->user_defined_fields->fieldValuesToSelectArray($definition[
'field_values']);
 
  734                $this->input[
"udf_" . $definition[
'field_id']] =
 
  735                    new ilSelectInputGUI($definition[
'field_name'], 
"udf_" . $definition[
'field_id']);
 
  736                $this->input[
"udf_" . $definition[
'field_id']]->setOptions(
$options);
 
  739            $value = $user_defined_data[
"f_" . $field_id];
 
  740            $this->input[
"udf_" . $definition[
'field_id']]->setValue($value);
 
  742            if ($definition[
'required']) {
 
  743                $this->input[
"udf_" . $definition[
'field_id']]->setRequired(
true);
 
  745            if (!$definition[
'changeable'] && (!$definition[
'required'] || $value)) {
 
  746                $this->input[
"udf_" . $definition[
'field_id']]->setDisabled(
true);
 
  750                $this->input[
"udf_" . $definition[
'field_id']]->setOptions(
$options);
 
  755        include_once(
"./Services/User/classes/class.ilUserProfile.php");
 
  757        $up->skipField(
"password");
 
  758        $up->skipGroup(
"settings");
 
  759        $up->skipGroup(
"preferences");
 
  761        $up->setAjaxCallback(
 
  762            $this->ctrl->getLinkTargetByClass(
'ilPublicUserProfileGUI', 
'doProfileAutoComplete', 
'', 
true)
 
  766        $up->addStandardFieldsToForm($this->form, 
$ilUser, $this->input);
 
  770        $this->form->addCommandButton(
"savePersonalData", 
$lng->txt(
"save"));
 
  782        if ($this->form->checkInput()) {
 
  787                "firstname" => 
"FirstName",
 
  788                "lastname" => 
"LastName",
 
  790                "sel_country" => 
"SelectedCountry",
 
  791                "phone_office" => 
"PhoneOffice",
 
  792                "phone_home" => 
"PhoneHome",
 
  793                "phone_mobile" => 
"PhoneMobile",
 
  794                "referral_comment" => 
"Comment",
 
  795                "interests_general" => 
"GeneralInterests",
 
  796                "interests_help_offered" => 
"OfferingHelp",
 
  797                "interests_help_looking" => 
"LookingForHelp" 
  799            include_once(
"./Services/User/classes/class.ilUserProfile.php");
 
  801            foreach ($up->getStandardFields() as $f => $p) {
 
  803                $item = $this->form->getItemByPostVar(
"usr_" . $f);
 
  804                if ($item && !$item->getDisabled()) {
 
  805                    $value = $this->form->getInput(
"usr_" . $f);
 
  808                            $value = $item->getDate();
 
  814                            $ilUser->setSecondEmail($value);
 
  818                            if (isset($map[$f])) {
 
  829            include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
 
  832                $location = $this->form->getInput(
"location");
 
  836                $ilUser->setLatitude(is_numeric($lat) ? $lat : 
null);
 
  837                $ilUser->setLongitude(is_numeric($long) ? $long : 
null);
 
  838                $ilUser->setLocationZoom(is_numeric($zoom) ? $zoom : 
null);
 
  842            $defs = $this->user_defined_fields->getVisibleDefinitions();
 
  844            foreach ($defs as $definition) {
 
  845                $f = 
"udf_" . $definition[
'field_id'];
 
  846                $item = $this->form->getItemByPostVar($f);
 
  847                if ($item && !$item->getDisabled()) {
 
  848                    $udf[$definition[
'field_id']] = $this->form->getInput($f);
 
  851            $ilUser->setUserDefinedData($udf);
 
  854            $un = $this->form->getInput(
'username');
 
  855            if ((
int) 
$ilSetting->get(
'allow_change_loginname') &&
 
  859                    $this->form->getItemByPostVar(
'username')->setAlert($this->lng->txt(
'login_invalid'));
 
  863                    $this->form->getItemByPostVar(
'username')->setAlert($this->lng->txt(
'loginname_already_exists'));
 
  872                        $this->form->getItemByPostVar(
'username')->setAlert($e->getMessage());
 
  883                $ilUser->setProfileIncomplete(
false);
 
  897                } elseif ($redirect = 
$_SESSION[
'profile_complete_redirect']) {
 
  898                    unset(
$_SESSION[
'profile_complete_redirect']);
 
  901                    $ilCtrl->redirect($this, 
"showPersonalData");
 
  906        $this->form->setValuesByPost();
 
  923        $ilTabs->activateTab(
"public_profile");
 
  928            $this->initPublicProfileForm();
 
  931        $ptpl = 
new ilTemplate(
"tpl.edit_personal_profile.html", 
true, 
true, 
"Services/User");
 
  932        $ptpl->setVariable(
"FORM", $this->form->getHTML());
 
  933        include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
 
  935        $ptpl->setVariable(
"PREVIEW", $pub_profile->getEmbeddable());
 
  936        $this->tpl->setContent($ptpl->get());
 
  950            include_once 
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
 
  964        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  967        $this->form->setTitle(
$lng->txt(
"public_profile"));
 
  968        $this->form->setDescription(
$lng->txt(
"user_public_profile_info"));
 
  969        $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  971        $portfolio_id = $this->getProfilePortfolio();
 
  973        if (!$portfolio_id) {
 
  976            $info = $this->lng->txt(
"user_activate_public_profile_info");
 
  977            $pub_prof = in_array(
$ilUser->prefs[
"public_profile"], array(
"y", 
"n", 
"g"))
 
  978                ? 
$ilUser->prefs[
"public_profile"]
 
  980            if (!
$ilSetting->get(
'enable_global_profiles') && $pub_prof == 
"g") {
 
  983            $radg->setValue($pub_prof);
 
  984            $op1 = 
new ilRadioOption(
$lng->txt(
"usr_public_profile_disabled"), 
"n", 
$lng->txt(
"usr_public_profile_disabled_info"));
 
  985            $radg->addOption($op1);
 
  987            $radg->addOption($op2);
 
  988            if (
$ilSetting->get(
'enable_global_profiles')) {
 
  990                $radg->addOption($op3);
 
  992            $this->form->addItem($radg);
 
  997                $prtf = 
"<br />" . 
$lng->txt(
"user_profile_portfolio");
 
  998                $prtf .= 
"<br /><a href=\"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToPortfolio\">» " .
 
  999                    $lng->txt(
"user_portfolios") . 
"</a>";
 
 1003            $radg->setInfo(
$info);
 
 1005            $prtf = 
$lng->txt(
"user_profile_portfolio_selected");
 
 1006            $prtf .= 
"<br /><a href=\"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToPortfolio&prt_id=" . $portfolio_id . 
"\">» " .
 
 1007                $lng->txt(
"portfolio") . 
"</a>";
 
 1010            $info->setHTML($prtf);
 
 1011            $this->form->addItem(
$info);
 
 1014        $this->showPublicProfileFields($this->form, 
$ilUser->prefs);
 
 1016        $this->form->addCommandButton(
"savePublicProfile", 
$lng->txt(
"save"));
 
 1031        $birthday = 
$ilUser->getBirthday();
 
 1035        $gender = 
$ilUser->getGender();
 
 1037            $gender = $this->lng->txt(
"gender_" . $gender);
 
 1040        if (
$ilUser->getSelectedCountry() != 
"") {
 
 1041            $this->lng->loadLanguageModule(
"meta");
 
 1042            $txt_sel_country = $this->lng->txt(
"meta_c_" . 
$ilUser->getSelectedCountry());
 
 1046        $pic = ilObjUser::_getPersonalPicturePath(
$ilUser->getId(), 
"xsmall", 
true, 
true);
 
 1048            $pic = 
"<img src=\"" . $pic . 
"\" />";
 
 1053            "title" => 
$ilUser->getUTitle(),
 
 1054            "birthday" => $birthday,
 
 1055            "gender" => $gender,
 
 1057            "interests_general" => 
$ilUser->getGeneralInterestsAsText(),
 
 1058            "interests_help_offered" => 
$ilUser->getOfferingHelpAsText(),
 
 1059            "interests_help_looking" => 
$ilUser->getLookingForHelpAsText(),
 
 1060            "org_units" => 
$ilUser->getOrgUnitsRepresentation(),
 
 1061            "institution" => 
$ilUser->getInstitution(),
 
 1062            "department" => 
$ilUser->getDepartment(),
 
 1063            "street" => 
$ilUser->getStreet(),
 
 1064            "zipcode" => 
$ilUser->getZipcode(),
 
 1066            "country" => 
$ilUser->getCountry(),
 
 1067            "sel_country" => $txt_sel_country,
 
 1068            "phone_office" => 
$ilUser->getPhoneOffice(),
 
 1069            "phone_home" => 
$ilUser->getPhoneHome(),
 
 1070            "phone_mobile" => 
$ilUser->getPhoneMobile(),
 
 1072            "email" => 
$ilUser->getEmail(),
 
 1073            "second_email" => 
$ilUser->getSecondEmail(),
 
 1074            "hobby" => 
$ilUser->getHobby(),
 
 1075            "matriculation" => 
$ilUser->getMatriculation()
 
 1079        include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
 
 1081            $val_array[
"location"] = 
"";
 
 1084        foreach ($val_array as 
$key => $value) {
 
 1089            if ($this->userSettingVisible(
$key)) {
 
 1093                        $caption = 
"personal_picture";
 
 1097                        $caption = 
"person_title";
 
 1104                if ($prefs[
"public_" . 
$key] == 
"y") {
 
 1105                    $cb->setChecked(
true);
 
 1108                $cb->setOptionTitle($value);
 
 1111                    $form->addItem($cb);
 
 1113                    $parent->addSubItem($cb);
 
 1119        $user_defined_data = array();
 
 1121            $user_defined_data = 
$ilUser->getUserDefinedData();
 
 1123        foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
 
 1125            $cb = 
new ilCheckboxInputGUI($definition[
"field_name"], 
"chk_udf_" . $definition[
"field_id"]);
 
 1126            $cb->setOptionTitle($user_defined_data[
"f_" . $definition[
"field_id"]]);
 
 1127            if ($prefs[
"public_udf_" . $definition[
"field_id"]] == 
"y") {
 
 1128                $cb->setChecked(
true);
 
 1132                $form->addItem($cb);
 
 1134                $parent->addSubItem($cb);
 
 1140            include_once 
"Services/Badge/classes/class.ilBadgeHandler.php";
 
 1143                $badge_options = array();
 
 1145                include_once 
"Services/Badge/classes/class.ilBadgeAssignment.php";
 
 1146                include_once 
"Services/Badge/classes/class.ilBadge.php";
 
 1149                    if ($ass->getPosition()) {
 
 1150                        $badge = 
new ilBadge($ass->getBadgeId());
 
 1151                        $badge_options[] = $badge->getTitle();
 
 1155                if (
sizeof($badge_options) > 1) {
 
 1157                    $badge_order->setMultiValues($badge_options);
 
 1158                    $badge_order->setValue(array_shift($badge_options));
 
 1159                    $badge_order->setMulti(
true, 
true, 
false);
 
 1162                        $form->addItem($badge_order);
 
 1164                        $parent->addSubItem($badge_order);
 
 1179        $this->initPublicProfileForm();
 
 1180        if ($this->form->checkInput()) {
 
 1182            if (isset(
$_POST[
"public_profile"])) {
 
 1183                $ilUser->setPref(
"public_profile", 
$_POST[
"public_profile"]);
 
 1187            $val_array = array(
"title", 
"birthday", 
"gender", 
"org_units", 
"institution", 
"department", 
"upload",
 
 1188                "street", 
"zipcode", 
"city", 
"country", 
"sel_country", 
"phone_office", 
"phone_home", 
"phone_mobile",
 
 1189                "fax", 
"email", 
"second_email", 
"hobby", 
"matriculation", 
"location",
 
 1190                "interests_general", 
"interests_help_offered", 
"interests_help_looking");
 
 1193            foreach ($val_array as 
$key => $value) {
 
 1194                if ((
$_POST[
"chk_" . $value])) {
 
 1195                    $ilUser->setPref(
"public_" . $value, 
"y");
 
 1197                    $ilUser->setPref(
"public_" . $value, 
"n");
 
 1202            foreach ($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition) {
 
 1203                if ((
$_POST[
"chk_udf_" . $definition[
"field_id"]])) {
 
 1204                    $ilUser->setPref(
"public_udf_" . $definition[
"field_id"], 
"y");
 
 1206                    $ilUser->setPref(
"public_udf_" . $definition[
"field_id"], 
"n");
 
 1213            include_once 
"Services/Badge/classes/class.ilBadgeHandler.php";
 
 1216                $badgePositions = [];
 
 1217                if (isset(
$_POST[
"bpos"]) && is_array(
$_POST[
"bpos"])) {
 
 1218                    $badgePositions = 
$_POST[
"bpos"];
 
 1221                if (count($badgePositions) > 0) {
 
 1222                    include_once 
"Services/Badge/classes/class.ilBadgeAssignment.php";
 
 1228            include_once 
'./Services/Search/classes/Lucene/class.ilLuceneIndexer.php';
 
 1232            $ilCtrl->redirect($this, 
"showPublicProfile");
 
 1234        $this->form->setValuesByPost();
 
 1235        $tpl->showPublicProfile(
true);
 
 1248        $ilTabs->activateTab(
"export");
 
 1251        include_once 
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
 
 1253        $button->setCaption(
"pd_export_profile");
 
 1254        $button->setUrl(
$ilCtrl->getLinkTarget($this, 
"exportPersonalData"));
 
 1255        $ilToolbar->addStickyItem($button);
 
 1257        $exp_file = 
$ilUser->getPersonalDataExportFile();
 
 1258        if ($exp_file != 
"") {
 
 1259            $ilToolbar->addSeparator();
 
 1260            $ilToolbar->addButton(
 
 1261                $this->lng->txt(
"pd_download_last_export_file"),
 
 1262                $ilCtrl->getLinkTarget($this, 
"downloadPersonalData")
 
 1266        $ilToolbar->addSeparator();
 
 1267        $ilToolbar->addButton(
 
 1268            $this->lng->txt(
"pd_import_personal_data"),
 
 1269            $ilCtrl->getLinkTarget($this, 
"importPersonalDataSelection")
 
 1283        $ilUser->exportPersonalData();
 
 1284        $ilUser->sendPersonalDataFile();
 
 1285        $ilCtrl->redirect($this, 
"showExportImport");
 
 1298        $ilUser->sendPersonalDataFile();
 
 1311        $ilTabs->activateTab(
"export");
 
 1314        $this->initPersonalDataImportForm();
 
 1316        $tpl->setContent($this->form->getHTML());
 
 1330        include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
 1335        $fi->setRequired(
true);
 
 1336        $fi->setSuffixes(array(
"zip"));
 
 1337        $this->form->addItem($fi);
 
 1341        $this->form->addItem($cb);
 
 1345        $this->form->addItem($cb);
 
 1349        $this->form->addItem($cb);
 
 1353        $this->form->addItem($cb);
 
 1357        $this->form->addItem($cb);
 
 1359        $this->form->addCommandButton(
"importPersonalData", 
$lng->txt(
"import"));
 
 1360        $this->form->addCommandButton(
"showExportImport", 
$lng->txt(
"cancel"));
 
 1362        $this->form->setTitle(
$lng->txt(
"pd_import_personal_data"));
 
 1363        $this->form->setFormAction(
$ilCtrl->getFormAction($this));
 
 1377        $this->initPersonalDataImportForm();
 
 1378        if ($this->form->checkInput()) {
 
 1381                (
int) 
$_POST[
"profile_data"],
 
 1382                (
int) 
$_POST[
"settings"],
 
 1383                (
int) 
$_POST[
"bookmarks"],
 
 1390            $ilTabs->activateTab(
"export");
 
 1392            $this->form->setValuesByPost();
 
 1393            $tpl->setContent($this->form->getHtml());
 
sprintf('%.4f', $callTime)
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
static getInstancesByUserId($a_user_id)
static updatePositions($a_user_id, array $a_positions)
static getInstance()
Constructor.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date @access public.
static updateLuceneIndex($a_obj_ids)
Update lucene index.
static isActivated()
Checks whether Map feature is activated.
static getDefaultSettings()
Get default longitude, latitude and zoom.
This class represents a non editable value in a property form.
static getDefaultPortfolio($a_user_id)
Get default portfolio of user.
getLatitude()
Get Latitude.
getCountry()
Get country (free text)
getLongitude()
Get Longitude.
getLocationZoom()
Get Location Zoom.
getStreet()
get street @access public
getCity()
get city @access public
static _loginExists($a_login, $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...
GUI class for personal profile.
saveProfile()
save user profile data
workWithUserSetting($setting)
Returns TRUE if working with the given user setting is allowed, FALSE otherwise.
initPersonalDataImportForm()
Init personal data import form.
showPublicProfileFields(ilPropertyformGUI $form, array $prefs, $parent=null, $anonymized=false)
Add fields to form.
importPersonalData()
Import personal data.
showPersonalData($a_no_init=false)
Personal data form.
showPublicProfile($a_no_init=false)
Public profile form.
executeCommand()
execute command
initPersonalDataForm()
Init personal form.
savePersonalData()
Save personal data form.
savePublicProfile()
Save public profile form.
exportPersonalData()
Export personal data.
userSettingVisible($setting)
Returns TRUE if user setting is visible, FALSE otherwise.
removeUserPicture()
remove user image
__checkUserDefinedRequiredFields()
getProfilePortfolio()
has profile set to a portfolio?
showExportImport()
Show export/import.
__showUserDefinedFields()
uploadUserPicture()
Upload user image.
downloadPersonalData()
Download personal data export file.
userSettingEnabled($setting)
Returns TRUE if user setting is enabled, FALSE otherwise.
__showOtherInformations()
importPersonalDataSelection()
Import personal data selection.
initPublicProfileForm()
Init public profile form.
showProfile()
show profile form
addLocationToForm(ilPropertyFormGUI $a_form, ilObjUser $a_user)
Add location fields to form if activated.
GUI class for public user profile presentation.
This class represents an option in a radio group.
static set($a_var, $a_val)
Set a value.
static get($a_var)
Get a value.
special template class to simplify handling of ITX/PEAR
static getByLanguageObject(ilLanguage $lng)
This class represents a text area property in a property form.
This class represents a text property in a property form.
static _getInstance()
Get instance.
Class for user related exception handling in ILIAS.
static isConvertVersionAtLeast($a_version)
Compare convert version numbers.
static escapeShellArg($a_arg)
static getWebspaceDir($mode="filesystem")
get webspace directory
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static execConvert($args)
execute convert command
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static is_email($a_email, ilMailRfc822AddressParserFactory $mailAddressParserFactory=null)
This preg-based function checks whether an e-mail address is formally valid.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
redirection script todo: (a better solution should control the processing via a xml file)
if(isset($_POST['submit'])) $form