51 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
58 $this->settings = $ilias->getAllSettings();
59 $lng->loadLanguageModule(
"jsmath");
60 $this->upload_error =
"";
61 $this->password_error =
"";
69 $next_class = $this->ctrl->getNextClass();
75 $cmd = $this->ctrl->getCmd(
"showProfile");
91 if ($this->settings[
"usr_settings_hide_".$setting] == 1)
95 if ($this->settings[
"usr_settings_disable_".$setting] == 1)
109 if ($this->settings[
"usr_settings_hide_".$setting] == 1)
123 if ($this->settings[
"usr_settings_disable_".$setting] == 1)
142 if ($_FILES[
"userfile"][
"size"] == 0)
144 $this->upload_error = $this->lng->txt(
"msg_no_file");
150 $image_dir = $webspace_dir.
"/usr_images";
151 $store_file =
"usr_".$ilUser->getID().
".".
"jpg";
154 $ilUser->setPref(
"profile_image", $store_file);
158 $uploaded_file = $image_dir.
"/upload_".$ilUser->getId().
"pic";
161 $uploaded_file,
false))
164 $this->ctrl->redirect($this,
"showProfile");
166 chmod($uploaded_file, 0770);
170 $show_file =
"$image_dir/usr_".$ilUser->getId().
".jpg";
171 $thumb_file =
"$image_dir/usr_".$ilUser->getId().
"_small.jpg";
172 $xthumb_file =
"$image_dir/usr_".$ilUser->getId().
"_xsmall.jpg";
173 $xxthumb_file =
"$image_dir/usr_".$ilUser->getId().
"_xxsmall.jpg";
180 system(
ilUtil::getConvertCmd().
" $uploaded_file" .
"[0] -geometry 200x200 -quality 100 JPEG:$show_file");
181 system(
ilUtil::getConvertCmd().
" $uploaded_file" .
"[0] -geometry 100x100 -quality 100 JPEG:$thumb_file");
182 system(
ilUtil::getConvertCmd().
" $uploaded_file" .
"[0] -geometry 75x75 -quality 100 JPEG:$xthumb_file");
183 system(
ilUtil::getConvertCmd().
" $uploaded_file" .
"[0] -geometry 30x30 -quality 100 JPEG:$xxthumb_file");
197 $ilUser->removeUserPicture();
228 if ($ilUser->getAuthMode(
true) !=
AUTH_LOCAL &&
229 ($ilUser->getAuthMode(
true) !=
AUTH_CAS || !$ilSetting->get(
"cas_allow_local")) &&
230 ($ilUser->getAuthMode(
true) !=
AUTH_SHIBBOLETH || !$ilSetting->get(
"shib_auth_allow_local")) &&
231 ($ilUser->getAuthMode(
true) !=
AUTH_SOAP || !$ilSetting->get(
"soap_auth_allow_local"))
234 $this->password_error = $this->lng->txt(
"not_changeable_for_non_local_auth");
238 if ($this->ilias->getSetting(
"passwd_auto_generate") == 1)
243 if ($ilUser->getAuthMode(
true) !=
AUTH_SHIBBOLETH || ! $ilSetting->get(
"shib_auth_allow_local"))
246 if (md5($_POST[
"current_password"]) != $ilUser->getPasswd())
248 $this->password_error = $this->lng->txt(
"passwd_wrong");
254 $this->password_error = $this->lng->txt(
"passwd_not_selected");
257 if (empty($this->password_error))
260 $ilUser->updatePassword($_POST[
"current_password"], $_POST[
"new_passwd"], $_POST[
"new_passwd"]);
268 if (($ilUser->getAuthMode(
true) !=
AUTH_SHIBBOLETH || ! $ilSetting->get(
"shib_auth_allow_local")) &&
269 md5($_POST[
"current_password"]) != $ilUser->getPasswd())
271 $this->password_error = $this->lng->txt(
"passwd_wrong");
275 else if ($_POST[
"desired_password"] != $_POST[
"retype_password"])
277 $this->password_error = $this->lng->txt(
"passwd_not_match");
282 if( $custom_error !=
'' )
283 $this->password_error = $custom_error;
284 else $this->password_error = $this->lng->txt(
"passwd_invalid");
286 else if ($ilUser->getAuthMode(
true) ==
AUTH_SHIBBOLETH && $ilSetting->get(
"shib_auth_allow_local") && empty($this->password_error))
288 if( $ilUser->resetPassword($_POST[
"desired_password"], $_POST[
"retype_password"]) )
291 $ilUser->setLastPasswordChangeToNow();
295 $this->password_error = $this->lng->txt(
"passwd_invalid");
298 else if ($_POST[
"current_password"] !=
"" and empty($this->password_error))
300 if( $ilUser->isPasswordExpired() || $ilUser->isPasswordChangeDemanded() )
302 if( $_POST[
"current_password"] != $_POST[
"desired_password"] )
304 if( $ilUser->updatePassword($_POST[
"current_password"], $_POST[
"desired_password"], $_POST[
"retype_password"]) )
307 $ilUser->setLastPasswordChangeToNow();
312 $this->password_error = $this->lng->txt(
"new_pass_equals_old_pass");
317 if ($ilUser->updatePassword($_POST[
"current_password"], $_POST[
"desired_password"], $_POST[
"retype_password"]))
319 $ilUser->setLastPasswordChangeToNow();
324 $this->password_error = $this->lng->txt(
"new_pass_equals_old_pass");
349 if (($_POST[
"chk_pub"])==
"on")
351 $ilUser->setPref(
"public_profile",
"y");
355 $ilUser->setPref(
"public_profile",
"n");
359 $val_array = array(
"institution",
"department",
"upload",
"street",
360 "zip",
"city",
"country",
"phone_office",
"phone_home",
"phone_mobile",
361 "fax",
"email",
"hobby",
"matriculation");
364 foreach($val_array as $key => $value)
366 if (($_POST[
"chk_".$value]) ==
"on")
368 $ilUser->setPref(
"public_".$value,
"y");
372 $ilUser->setPref(
"public_".$value,
"n");
377 if ($d_set->get(
"user_profile"))
379 if (($_POST[
"chk_delicious"]) ==
"on")
381 $ilUser->setPref(
"public_delicious",
"y");
385 $ilUser->setPref(
"public_delicious",
"n");
391 foreach($this->settings as $key => $val)
393 if (substr($key,0,8) ==
"require_")
395 $require_keys[] = substr($key,8);
399 foreach($require_keys as $key => $val)
402 $system_fields = array(
"login",
"default_role",
"passwd",
"passwd2");
403 if (!in_array($val, $system_fields))
407 if (isset($this->settings[
"require_" . $val]) && $this->settings[
"require_" . $val])
409 if (empty($_POST[
"usr_" . $val]))
411 ilUtil::sendInfo($this->lng->txt(
"fill_out_all_required_fields") .
": " . $this->lng->txt($val));
429 if (!
ilUtil::is_email($_POST[
"usr_email"]) and !empty($_POST[
"usr_email"]) and $form_valid)
447 $ilUser->setGender($_POST[
"usr_gender"]);
453 $ilUser->setFullname();
513 if ($d_set->get(
"user_profile"))
529 $ilUser->setUserDefinedData($_POST[
'udf']);
540 if ($_POST[
"usr_skin_style"] !=
"")
542 $sknst = explode(
":", $_POST[
"usr_skin_style"]);
544 if ($ilUser->getPref(
"style") != $sknst[1] ||
545 $ilUser->getPref(
"skin") != $sknst[0])
547 $ilUser->setPref(
"skin", $sknst[0]);
548 $ilUser->setPref(
"style", $sknst[1]);
559 if ($_POST[
"usr_language"] != $ilUser->getLanguage())
565 $ilUser->setLanguage($_POST[
"usr_language"]);
571 if ($_POST[
"hits_per_page"] !=
"")
573 $ilUser->setPref(
"hits_per_page",$_POST[
"hits_per_page"]);
580 $ilUser->setPref(
"show_users_online", $_POST[
"show_users_online"]);
586 if ($_POST[
"chk_hide_own_online_status"] !=
"")
588 $ilUser->setPref(
"hide_own_online_status",
"y");
592 $ilUser->setPref(
"hide_own_online_status",
"n");
609 $ilUser->setProfileIncomplete(
false);
612 $ilUser->setTitle($ilUser->getFullname());
613 $ilUser->setDescription($ilUser->getEmail());
619 if (!empty($this->password_error))
623 elseif (!empty($this->upload_error))
631 $this->ctrl->redirect($this,
"");
652 $settings = $ilias->getAllSettings();
654 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.usr_profile.html");
675 if ($ilUser->getProfileIncomplete())
690 $languages = $this->lng->getInstalledLanguages();
693 $selected_lang = (isset($_POST[
"usr_language"]))
694 ? $_POST[
"usr_language"]
695 : $ilUser->getLanguage();
698 foreach($languages as $lang_key)
700 $this->tpl->setCurrentBlock(
"sel_lang");
703 $this->tpl->setVariable(
"LANGSHORT", $lang_key);
705 if ($selected_lang == $lang_key)
707 $this->tpl->setVariable(
"SELECTED_LANG",
"selected=\"selected\"");
710 $this->tpl->parseCurrentBlock();
715 include_once(
"./Services/Style/classes/class.ilObjStyleSettings.php");
716 $templates = $styleDefinition->getAllTemplates();
720 if (is_array($templates))
723 foreach($templates as $template)
727 $styleDef->startParsing();
728 $styles = $styleDef->getStyles();
730 foreach($styles as $style)
737 $this->tpl->setCurrentBlock(
"selectskin");
739 if ($ilUser->skin == $template[
"id"] &&
740 $ilUser->prefs[
"style"] == $style[
"id"])
742 $this->tpl->setVariable(
"SKINSELECTED",
"selected=\"selected\"");
745 $this->tpl->setVariable(
"SKINVALUE", $template[
"id"].
":".$style[
"id"]);
746 $this->tpl->setVariable(
"SKINOPTION", $styleDef->getTemplateName().
" / ".$style[
"name"]);
747 $this->tpl->parseCurrentBlock();
757 $hits_options = array(2,10,15,20,30,40,50,100,9999);
759 foreach($hits_options as $hits_option)
761 $this->tpl->setCurrentBlock(
"selecthits");
763 if ($ilUser->prefs[
"hits_per_page"] == $hits_option)
765 $this->tpl->setVariable(
"HITSSELECTED",
"selected=\"selected\"");
768 $this->tpl->setVariable(
"HITSVALUE", $hits_option);
770 if ($hits_option == 9999)
772 $hits_option = $this->lng->txt(
"no_limit");
775 $this->tpl->setVariable(
"HITSOPTION", $hits_option);
776 $this->tpl->parseCurrentBlock();
783 $users_online_options = array(
"y",
"associated",
"n");
784 $selected_option = $ilUser->prefs[
"show_users_online"];
785 foreach($users_online_options as $an_option)
787 $this->tpl->setCurrentBlock(
"select_users_online");
789 if ($selected_option == $an_option)
791 $this->tpl->setVariable(
"USERS_ONLINE_SELECTED",
"selected=\"selected\"");
794 $this->tpl->setVariable(
"USERS_ONLINE_VALUE", $an_option);
796 $this->tpl->setVariable(
"USERS_ONLINE_OPTION", $this->lng->txt(
"users_online_show_".$an_option));
797 $this->tpl->parseCurrentBlock();
803 if ($ilUser->prefs[
"hide_own_online_status"] ==
"y")
805 $this->tpl->setVariable(
"CHK_HIDE_OWN_ONLINE_STATUS",
"checked");
821 if (($ilUser->getAuthMode(
true) ==
AUTH_LOCAL ||
822 ($ilUser->getAuthMode(
true) ==
AUTH_CAS && $ilSetting->get(
"cas_allow_local")) ||
823 ($ilUser->getAuthMode(
true) ==
AUTH_SHIBBOLETH && $ilSetting->get(
"shib_auth_allow_local")) ||
824 ($ilUser->getAuthMode(
true) ==
AUTH_SOAP && $ilSetting->get(
"soap_auth_allow_local"))
829 if($this->ilias->getSetting(
'usr_settings_disable_password'))
831 $this->tpl->setCurrentBlock(
"disabled_password");
832 $this->tpl->setVariable(
"TXT_DISABLED_PASSWORD", $this->lng->txt(
"chg_password"));
833 $this->tpl->setVariable(
"TXT_DISABLED_CURRENT_PASSWORD", $this->lng->txt(
"current_password"));
834 $this->tpl->parseCurrentBlock();
836 elseif ($settings[
"passwd_auto_generate"] == 1)
840 foreach ($passwd_list as $passwd)
845 $this->tpl->setCurrentBlock(
"select_password");
846 switch ($ilUser->getAuthMode(
true))
849 $this->tpl->setVariable(
"TXT_CHANGE_PASSWORD", $this->lng->txt(
"chg_password"));
852 $this->tpl->setVariable(
"TXT_CHANGE_PASSWORD", $this->lng->txt(
"chg_ilias_and_webfolder_password"));
855 $this->tpl->setVariable(
"TXT_CHANGE_PASSWORD", $this->lng->txt(
"chg_ilias_password"));
861 if ($ilUser->getAuthMode(
true) !=
AUTH_SHIBBOLETH || ! $ilSetting->get(
"shib_auth_allow_local"))
863 $this->tpl->setVariable(
"TXT_CURRENT_PASSWORD", $this->lng->txt(
"current_password"));
865 $this->tpl->setVariable(
"TXT_SELECT_PASSWORD", $this->lng->txt(
"select_password"));
866 $this->tpl->setVariable(
"PASSWORD_CHOICE", $passwd_choice);
867 $this->tpl->setVariable(
"TXT_NEW_LIST_PASSWORD", $this->lng->txt(
"new_list_password"));
868 $this->tpl->parseCurrentBlock();
872 $this->tpl->setCurrentBlock(
"change_password");
873 switch ($ilUser->getAuthMode(
true))
876 $this->tpl->setVariable(
"TXT_CHANGE_PASSWORD", $this->lng->txt(
"chg_password"));
879 require_once
'Services/WebDAV/classes/class.ilDAVServer.php';
882 $this->tpl->setVariable(
"TXT_CHANGE_PASSWORD", $this->lng->txt(
"chg_ilias_and_webfolder_password"));
886 $this->tpl->setVariable(
"TXT_CHANGE_PASSWORD", $this->lng->txt(
"chg_ilias_password"));
890 $this->tpl->setVariable(
"TXT_CHANGE_PASSWORD", $this->lng->txt(
"chg_ilias_password"));
896 if ($ilUser->getAuthMode(
true) !=
AUTH_SHIBBOLETH || ! $ilSetting->get(
"shib_auth_allow_local"))
898 $this->tpl->setVariable(
"TXT_CURRENT_PW", $this->lng->txt(
"current_password"));
900 $this->tpl->setVariable(
"TXT_DESIRED_PW", $this->lng->txt(
"desired_password"));
901 $this->tpl->setVariable(
"TXT_RETYPE_PW", $this->lng->txt(
"retype_password"));
902 $this->tpl->setVariable(
"CHANGE_PASSWORD", $this->lng->txt(
"chg_password"));
903 $this->tpl->parseCurrentBlock();
908 $this->lng->txt(
"personal_desktop"));
910 $this->tpl->setCurrentBlock(
"content");
911 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
913 $this->tpl->setVariable(
"HEADER", $this->lng->txt(
"personal_desktop"));
914 $this->tpl->setVariable(
"TXT_OF",strtolower($this->lng->txt(
"of")));
915 $this->tpl->setVariable(
"USR_FULLNAME",$ilUser->getFullname());
917 $this->tpl->setVariable(
"TXT_USR_DATA", $this->lng->txt(
"userdata"));
918 switch ($ilUser->getAuthMode(
true))
921 $this->tpl->setVariable(
"TXT_NICKNAME", $this->lng->txt(
"username"));
924 require_once
'Services/WebDAV/classes/class.ilDAVServer.php';
927 $this->tpl->setVariable(
"TXT_NICKNAME", $this->lng->txt(
"ilias_and_webfolder_username"));
931 $this->tpl->setVariable(
"TXT_NICKNAME", $this->lng->txt(
"ilias_username"));
935 $this->tpl->setVariable(
"TXT_NICKNAME", $this->lng->txt(
"ilias_username"));
938 $this->tpl->setVariable(
"TXT_PUBLIC_PROFILE", $this->lng->txt(
"public_profile"));
941 $data[
"fields"] = array();
942 $data[
"fields"][
"gender"] =
"";
943 $data[
"fields"][
"firstname"] =
"";
944 $data[
"fields"][
"lastname"] =
"";
945 $data[
"fields"][
"title"] =
"";
946 $data[
"fields"][
"institution"] =
"";
947 $data[
"fields"][
"department"] =
"";
948 $data[
"fields"][
"street"] =
"";
949 $data[
"fields"][
"city"] =
"";
950 $data[
"fields"][
"zipcode"] =
"";
951 $data[
"fields"][
"country"] =
"";
952 $data[
"fields"][
"phone_office"] =
"";
953 $data[
"fields"][
"phone_home"] =
"";
954 $data[
"fields"][
"phone_mobile"] =
"";
955 $data[
"fields"][
"fax"] =
"";
956 $data[
"fields"][
"email"] =
"";
957 $data[
"fields"][
"hobby"] =
"";
958 $data[
"fields"][
"referral_comment"] =
"";
959 $data[
"fields"][
"matriculation"] =
"";
960 $data[
"fields"][
"create_date"] =
"";
961 $data[
"fields"][
"approve_date"] =
"";
962 $data[
"fields"][
"active"] =
"";
964 $data[
"fields"][
"default_role"] = $role;
966 foreach(
$data[
"fields"] as $key => $val)
971 $str = $this->lng->txt($key);
975 $str = $this->lng->txt(
"person_title");
979 if (isset($this->settings[
"require_" . $key]) && $this->settings[
"require_" . $key])
981 $str = $str .
'<span class="asterisk">*</span>';
986 $this->tpl->setVariable(
"TXT_".strtoupper($key), $str);
992 $this->tpl->setVariable(
"TXT_GENDER_F",$this->lng->txt(
"gender_f"));
993 $this->tpl->setVariable(
"TXT_GENDER_M",$this->lng->txt(
"gender_m"));
997 if ($d_set->get(
"user_profile"))
999 $this->tpl->setVariable(
"TXT_DELICIOUS", $lng->txt(
"delicious"));
1004 $this->tpl->setVariable(
"TXT_UPLOAD",$this->lng->txt(
"personal_picture"));
1006 $full_img = $ilUser->getPref(
"profile_image");
1007 $last_dot = strrpos($full_img,
".");
1008 $small_img = substr($full_img, 0, $last_dot).
1009 "_small".substr($full_img, $last_dot, strlen($full_img) - $last_dot);
1010 $image_file = $webspace_dir.
"/usr_images/".$small_img;
1012 if (@is_file($image_file))
1014 $this->tpl->setCurrentBlock(
"pers_image");
1015 $this->tpl->setVariable(
"IMG_PERSONAL", $image_file.
"?dummy=".rand(1,99999));
1016 $this->tpl->setVariable(
"ALT_IMG_PERSONAL",$this->lng->txt(
"personal_picture"));
1017 $this->tpl->parseCurrentBlock();
1020 $this->tpl->setCurrentBlock(
"remove_pic");
1021 $this->tpl->setVariable(
"TXT_REMOVE_PIC", $this->lng->txt(
"remove_personal_picture"));
1023 $this->tpl->parseCurrentBlock();
1024 $this->tpl->setCurrentBlock(
"content");
1029 $this->tpl->setCurrentBlock(
"upload_pic");
1030 $this->tpl->setVariable(
"UPLOAD", $this->lng->txt(
"upload"));
1032 $this->tpl->setVariable(
"TXT_FILE", $this->lng->txt(
"userfile"));
1033 $this->tpl->setVariable(
"USER_FILE", $this->lng->txt(
"user_file"));
1035 $this->tpl->setCurrentBlock(
"adm_content");
1038 if ($this->
userSettingVisible(
"upload") and $this->ilias->getSetting(
"ilinc_active"))
1040 include_once (
'./Modules/ILinc/classes/class.ilObjiLincUser.php');
1043 if ($ilinc_user->id)
1045 include_once (
'./Modules/ILinc/classes/class.ilnetucateXMLAPI.php');
1048 $ilincAPI->uploadPicture($ilinc_user);
1049 $response = $ilincAPI->sendRequest(
"uploadPicture");
1052 $url = trim($response->data[
'url'][
'cdata']);
1053 $this->tpl->setCurrentBlock(
"ilinc_upload_pic");
1054 $this->tpl->setVariable(
"TXT_ILINC_UPLOAD", $this->lng->txt(
"ilinc_upload_pic_text"));
1055 $this->tpl->setVariable(
"ILINC_UPLOAD_LINK", $url);
1056 $this->tpl->setVariable(
"ILINC_UPLOAD_LINKTXT", $this->lng->txt(
"ilinc_upload_pic_linktext"));
1057 $this->tpl->parseCurrentBlock();
1064 $this->tpl->setVariable(
"TXT_LANGUAGE", $this->lng->txt(
"language"));
1068 $this->tpl->setVariable(
"TXT_SHOW_USERS_ONLINE", $this->lng->txt(
"show_users_online"));
1072 $this->tpl->setVariable(
"TXT_HIDE_OWN_ONLINE_STATUS", $this->lng->txt(
"hide_own_online_status"));
1076 $this->tpl->setVariable(
"TXT_USR_SKIN_STYLE", $this->lng->txt(
"usr_skin_style"));
1080 $this->tpl->setVariable(
"TXT_HITS_PER_PAGE", $this->lng->txt(
"usr_hits_per_page"));
1084 $this->tpl->setVariable(
"TXT_SHOW_USERS_ONLINE", $this->lng->txt(
"show_users_online"));
1086 $this->tpl->setVariable(
"TXT_PERSONAL_DATA", $this->lng->txt(
"personal_data"));
1087 $this->tpl->setVariable(
"TXT_SYSTEM_INFO", $this->lng->txt(
"system_information"));
1088 $this->tpl->setVariable(
"TXT_CONTACT_DATA", $this->lng->txt(
"contact_data"));
1092 $this->tpl->setVariable(
"TXT_OTHER", $this->lng->txt(
"user_profile_other"));
1095 $this->tpl->setVariable(
"TXT_SETTINGS", $this->lng->txt(
"settings"));
1112 $gender = strtoupper($ilUser->getGender());
1114 if (!empty($gender))
1116 $this->tpl->setVariable(
"BTN_GENDER_".$gender,
"checked=\"checked\"");
1120 $this->tpl->setVariable(
"CREATE_DATE", $ilUser->getCreateDate());
1121 $this->tpl->setVariable(
"APPROVE_DATE", $ilUser->getApproveDate());
1123 if ($ilUser->getActive())
1125 $this->tpl->setVariable(
"ACTIVE",
"checked=\"checked\"");
1192 $this->tpl->setVariable(
"TXT_INSTANT_MESSENGERS", $this->lng->txt(
"user_profile_instant_messengers"));
1194 $im_arr = array(
"icq",
"yahoo",
"msn",
"aim",
"skype");
1195 $im_disabled = !$this->
userSettingEnabled(
"instant_messengers") ?
"disabled=\"disabled\"":
"";
1197 foreach ($im_arr as $im_name)
1199 $im_id = $ilUser->getInstantMessengerId($im_name);
1200 $this->tpl->setCurrentBlock(
"im_row");
1201 $this->tpl->setVariable(
"TXT_IM_NAME",$this->lng->txt(
"im_".$im_name));
1202 $this->tpl->setVariable(
"USR_IM_NAME",
"usr_im_".$im_name);
1203 $this->tpl->setVariable(
"IM_ID",$im_id);
1204 $this->tpl->setVariable(
"DISABLED_IM_NAME",$im_disabled);
1206 $this->tpl->setVariable(
"TXT_IM_ICON", $this->lng->txt(
"im_".$im_name.
"_icon"));
1207 $this->tpl->setVariable(
"CHK_IM",
"checked=\"checked\" disabled=\"disabled\"");
1208 $this->tpl->parseCurrentBlock();
1213 if ($d_set->get(
"user_profile") ==
"1")
1222 $global_roles = $rbacreview->getGlobalRoles();
1224 foreach($global_roles as $role_id)
1226 if (in_array($role_id,$rbacreview->assignedRoles($ilUser->getId())))
1228 $roleObj = $this->ilias->obj_factory->getInstanceByObjId($role_id);
1229 $role_names .= $roleObj->getTitle().
", ";
1234 $this->tpl->setVariable(
"TXT_DEFAULT_ROLES", $this->lng->txt(
"default_roles"));
1235 $this->tpl->setVariable(
"DEFAULT_ROLES", substr($role_names,0,-2));
1237 $this->tpl->setVariable(
"TXT_REQUIRED_FIELDS", $this->lng->txt(
"required_field"));
1240 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
1245 $this->tpl->setVariable(
"UPLOAD", $this->lng->txt(
"upload"));
1249 if ($ilUser->prefs[
"public_profile"] ==
"y")
1251 $this->tpl->setVariable(
"CHK_PUB",
"checked");
1253 $val_array = array(
"institution",
"department",
"upload",
"street",
1254 "zip",
"city",
"country",
"phone_office",
"phone_home",
"phone_mobile",
1255 "fax",
"email",
"hobby",
"matriculation",
"show_users_online");
1256 foreach($val_array as $key => $value)
1260 if ($ilUser->prefs[
"public_".$value] ==
"y")
1262 $this->tpl->setVariable(
"CHK_".strtoupper($value),
"checked");
1268 if ($d_set->get(
"user_profile") ==
"1")
1270 if ($ilUser->prefs[
"public_delicious"] ==
"y")
1272 $this->tpl->setVariable(
"CHK_DELICIOUS",
"checked");
1281 $profile_fields = array(
1304 "show_users_online",
1305 "hide_own_online_status"
1307 foreach ($profile_fields as $field)
1309 if (!$this->ilias->getSetting(
"usr_settings_hide_" . $field))
1311 if ($this->ilias->getSetting(
"usr_settings_disable_" . $field))
1313 $this->tpl->setVariable(
"DISABLED_" . strtoupper($field),
" disabled=\"disabled\"");
1318 $this->tpl->parseCurrentBlock();
1326 require_once
"Services/Mail/classes/class.ilMailOptions.php";
1329 $this->lng->loadLanguageModule(
"mail");
1331 $mailOptions->
updateOptions($_POST[
"signature"],(
int) $_POST[
"linebreak"],(
int) $_POST[
"incoming_type"],(
int) $_POST[
"cronjob_notification"]);
1343 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.usr_profile_mail.html");
1345 $this->tpl->setTitleIcon(
ilUtil::getImagePath(
"icon_pd_b.gif"), $this->lng->txt(
"personal_desktop"));
1346 $this->tpl->setVariable(
"HEADER", $this->lng->txt(
"personal_desktop"));
1348 require_once
"Services/Mail/classes/class.ilMailOptions.php";
1351 $this->lng->loadLanguageModule(
"mail");
1354 $this->tpl->setCurrentBlock(
"option_inc_line");
1356 $inc = array($this->lng->txt(
"mail_incoming_local"),$this->lng->txt(
"mail_incoming_smtp"),$this->lng->txt(
"mail_incoming_both"));
1357 foreach($inc as $key => $option)
1359 $this->tpl->setVariable(
"OPTION_INC_VALUE",$key);
1360 $this->tpl->setVariable(
"OPTION_INC_NAME",$option);
1361 $this->tpl->setVariable(
"OPTION_INC_SELECTED",$mailOptions->getIncomingType() == $key ?
"selected=\"selected\"" :
"");
1362 $this->tpl->parseCurrentBlock();
1366 $this->tpl->setVariable(
'INC_DISABLED',
'disabled="disabled"');
1370 $this->tpl->setCurrentBlock(
"option_line");
1373 for($i = 50; $i <= 80;$i++)
1375 $this->tpl->setVariable(
"OPTION_VALUE",$i);
1376 $this->tpl->setVariable(
"OPTION_NAME",$i);
1377 if( $i == $linebreak)
1379 $this->tpl->setVariable(
"OPTION_SELECTED",
"selected");
1381 $this->tpl->parseCurrentBlock();
1383 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1384 $this->tpl->setVariable(
"GLOBAL_OPTIONS",$this->lng->txt(
"mail_global_options"));
1385 $this->tpl->setVariable(
"TXT_INCOMING", $this->lng->txt(
"mail_incoming"));
1386 $this->tpl->setVariable(
"TXT_LINEBREAK", $this->lng->txt(
"linebreak"));
1387 $this->tpl->setVariable(
"TXT_SIGNATURE", $this->lng->txt(
"signature"));
1388 $this->tpl->setVariable(
"CONTENT",$mailOptions->getSignature());
1389 $this->tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
1391 if ($ilias->getSetting(
"mail_notification"))
1393 $this->tpl->setVariable(
"TXT_CRONJOB_NOTIFICATION", $this->lng->txt(
"cron_mail_notification"));
1394 $this->tpl->setVariable(
"TXT_CRONJOB_NOTIFICATION_INFO", $this->lng->txt(
"mail_cronjob_notification_info"));
1395 if ($mailOptions->getCronjobNotification())
1397 $this->tpl->setVariable(
"CRONJOB_NOTIFICATION_SELECTED",
" checked=\"checked\"");
1409 $this->tpl->setTitleIcon(
ilUtil::getImagePath(
"icon_pd_b.gif"), $this->lng->txt(
"personal_desktop"));
1410 $this->tpl->setVariable(
"HEADER", $this->lng->txt(
"personal_desktop"));
1412 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1414 $form->setFormAction($ilCtrl->getFormAction($this));
1415 $form->setTitle($lng->txt(
"jsmath_settings"));
1418 include_once
"./Services/Administration/classes/class.ilSetting.php";
1419 $jsMathSetting =
new ilSetting(
"jsMath");
1421 $checked = ($ilUser->getPref(
"js_math") === FALSE) ? $jsMathSetting->get(
"makedefault") : $ilUser->getPref(
"js_math");
1423 $enable->setInfo($lng->txt(
"jsmath_enable_user_desc"));
1424 $form->addItem($enable);
1426 $form->addCommandButton(
"savejsMath", $lng->txt(
"save"));
1427 $form->addCommandButton(
"showjsMath", $lng->txt(
"cancel"));
1429 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
1437 include_once
"./Services/Administration/classes/class.ilSetting.php";
1438 $jsMathSetting =
new ilSetting(
"jsMath");
1439 if ($jsMathSetting->get(
"enable"))
1441 if ($_POST[
"enable"])
1443 $ilUser->writePref(
"js_math",
"1");
1447 $ilUser->writePref(
"js_math",
"0");
1450 $ilCtrl->redirect($this,
"showjsMath");
1457 $lng->loadLanguageModule(
"gmaps");
1460 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
1468 $latitude = $ilUser->getLatitude();
1469 $longitude = $ilUser->getLongitude();
1470 $zoom = $ilUser->getLocationZoom();
1473 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
1476 $latitude = $def[
"latitude"];
1477 $longitude = $def[
"longitude"];
1478 $zoom = $def[
"zoom"];
1481 $this->tpl->setTitleIcon(
ilUtil::getImagePath(
"icon_pd_b.gif"), $this->lng->txt(
"personal_desktop"));
1482 $this->tpl->setVariable(
"HEADER", $this->lng->txt(
"personal_desktop"));
1484 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1486 $form->setFormAction($ilCtrl->getFormAction($this));
1488 $form->setTitle($this->lng->txt(
"location").
" ".
1489 strtolower($this->lng->txt(
"of")).
" ".$ilUser->getFullname());
1495 $public->setInfo($this->lng->txt(
"gmaps_public_profile_info"));
1496 $public->setChecked($ilUser->getPref(
"public_location"));
1497 $form->addItem($public);
1503 $loc_prop->setLongitude($longitude);
1504 $loc_prop->setZoom($zoom);
1505 $form->addItem($loc_prop);
1507 $form->addCommandButton(
"saveLocation", $this->lng->txt(
"save"));
1509 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
1517 $ilUser->writePref(
"public_location", $_POST[
"public_location"]);
1524 $ilCtrl->redirect($this,
"showLocation");
1532 $showProfile = ($a_cmd ==
'showProfile') ?
true :
false;
1533 $showMailOptions = ($a_cmd ==
'showMailOptions') ?
true :
false;
1534 $showLocation = ($a_cmd ==
'showLocation') ?
true :
false;
1535 $showjsMath = ($a_cmd ==
'showjsMath') ?
true :
false;
1537 $ilTabs->addSubTabTarget(
"general_settings", $this->ctrl->getLinkTarget($this,
"showProfile"),
1538 "",
"",
"", $showProfile);
1545 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
1548 $ilTabs->addSubTabTarget(
"location", $this->ctrl->getLinkTarget($this,
"showLocation"),
1549 "",
"",
"", $showLocation);
1552 $ilTabs->addSubTabTarget(
"mail_settings", $this->ctrl->getLinkTarget($this,
"showMailOptions"),
1553 "",
"",
"", $showMailOptions);
1554 include_once
"./Services/Administration/classes/class.ilSetting.php";
1555 $jsMathSetting =
new ilSetting(
"jsMath");
1556 if ($jsMathSetting->get(
"enable"))
1558 $ilTabs->addSubTabTarget(
"jsmath_extt_jsmath", $this->ctrl->getLinkTarget($this,
"showjsMath"),
1559 "",
"",
"", $showjsMath);
1567 if($this->
userSettingVisible(
"matriculation") or count($this->user_defined_fields->getVisibleDefinitions())
1568 or $d_set->get(
"user_profile") ==
"1")
1579 $user_defined_data = $ilUser->getUserDefinedData();
1580 foreach($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
1584 $this->tpl->setCurrentBlock(
"field_text");
1586 if(!$definition[
'changeable'])
1588 $this->tpl->setVariable(
"DISABLED_FIELD",
'disabled=\"disabled\"');
1589 $this->tpl->setVariable(
"FIELD_NAME",
'udf['.$definition[
'field_id'].
']');
1593 $this->tpl->setVariable(
"FIELD_NAME",
'udf['.$definition[
'field_id'].
']');
1595 $this->tpl->parseCurrentBlock();
1599 if($definition[
'changeable'])
1601 $name =
'udf['.$definition[
'field_id'].
']';
1609 $this->tpl->setCurrentBlock(
"field_select");
1610 $this->tpl->setVariable(
"SELECT_BOX",
ilUtil::formSelect($user_defined_data[$field_id],
1612 $this->user_defined_fields->fieldValuesToSelectArray(
1613 $definition[
'field_values']),
1615 true,0,
'',
'',$disabled));
1616 $this->tpl->parseCurrentBlock();
1618 $this->tpl->setCurrentBlock(
"user_defined");
1620 if($definition[
'required'])
1622 $name = $definition[
'field_name'].
"<span class=\"asterisk\">*</span>";
1626 $name = $definition[
'field_name'];
1628 $this->tpl->setVariable(
"TXT_FIELD_NAME",$name);
1629 $this->tpl->parseCurrentBlock();
1636 foreach($this->user_defined_fields->getVisibleDefinitions() as $definition)
1638 $field_id = $definition[
'field_id'];
1639 if($definition[
'required'] and !strlen($_POST[
'udf'][$field_id]))
1656 $settings = $ilias->getAllSettings();
1661 if ($ilUser->getProfileIncomplete())
1673 $this->lng->txt(
"personal_desktop"));
1674 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
1677 $this->tpl->setVariable(
"ADM_CONTENT", $this->form->getHTML());
1687 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1689 $this->form->setFormAction($this->ctrl->getFormAction($this));
1690 $this->form->setSubformMode(
"right");
1694 $sh->setTitle($this->lng->txt(
"userdata").
" ".
1695 strtolower($this->lng->txt(
"of")).
" ".$ilUser->getFullname());
1696 $this->form->addItem($sh);
1700 $val->
setValue($ilUser->getLogin());
1701 $this->form->addItem($val);
1704 $global_roles = $rbacreview->getGlobalRoles();
1705 foreach($global_roles as $role_id)
1707 if (in_array($role_id,$rbacreview->assignedRoles($ilUser->getId())))
1709 $roleObj = $this->ilias->obj_factory->getInstanceByObjId($role_id);
1710 $role_names .= $roleObj->getTitle().
", ";
1715 $dr->
setValue(substr($role_names,0,-2));
1716 $this->form->addItem($dr);
1720 $sh->setTitle($this->lng->txt(
"personal_data"));
1721 $this->form->addItem($sh);
1726 $this->input[
"gender"] =
1728 $this->input[
"gender"]->
setValue($ilUser->getGender());
1731 $this->input[
"gender"]->addOption($fem);
1732 $this->input[
"gender"]->addOption($mal);
1733 $this->form->addItem($this->input[
"gender"]);
1739 $this->input[
"firstname"] =
1741 $this->input[
"firstname"]->
setValue($ilUser->getFirstname());
1742 $this->input[
"firstname"]->setMaxLength(32);
1743 $this->input[
"firstname"]->setSize(40);
1744 $this->form->addItem($this->input[
"firstname"]);
1750 $this->input[
"lastname"] =
1752 $this->input[
"lastname"]->
setValue($ilUser->getLastname());
1753 $this->input[
"lastname"]->setMaxLength(32);
1754 $this->input[
"lastname"]->setSize(40);
1755 $this->form->addItem($this->input[
"lastname"]);
1761 $this->input[
"title"] =
1763 $this->input[
"title"]->
setValue($ilUser->getUTitle());
1764 $this->input[
"title"]->setMaxLength(32);
1765 $this->input[
"title"]->setSize(40);
1766 $this->form->addItem($this->input[
"title"]);
1772 $this->input[
"image"] =
1774 $im = $ilUser->getPersonalPicturePath();
1777 $this->input[
"image"]->
setImage($im);
1778 $this->input[
"image"]->setAlt($this->lng->txt(
"personal_picture"));
1782 if ($this->
userSettingVisible(
"upload") and $this->ilias->getSetting(
"ilinc_active"))
1784 include_once (
'./Modules/ILinc/classes/class.ilObjiLincUser.php');
1787 if ($ilinc_user->id)
1789 include_once (
'./Modules/ILinc/classes/class.ilnetucateXMLAPI.php');
1791 $ilincAPI->uploadPicture($ilinc_user);
1792 $response = $ilincAPI->sendRequest(
"uploadPicture");
1795 $url = trim($response->data[
'url'][
'cdata']);
1797 $this->lng->txt(
"ilinc_upload_pic_text").
" ".
1798 '<a href="'.$url.
'">'.$this->lng->txt(
"ilinc_upload_pic_linktext").
'</a>';
1799 $this->input[
"image"]->setInfo($desc);
1803 $this->form->addItem($this->input[
"image"]);
1808 $sh->setTitle($this->lng->txt(
"contact_data"));
1809 $this->form->addItem($sh);
1814 $this->input[
"institution"] =
1816 $this->input[
"institution"]->
setValue($ilUser->getInstitution());
1817 $this->input[
"institution"]->setMaxLength(80);
1818 $this->input[
"institution"]->setSize(40);
1819 $this->form->addItem($this->input[
"institution"]);
1825 $this->input[
"department"] =
1827 $this->input[
"department"]->
setValue($ilUser->getDepartment());
1828 $this->input[
"department"]->setMaxLength(80);
1829 $this->input[
"department"]->setSize(40);
1830 $this->form->addItem($this->input[
"department"]);
1836 $this->input[
"street"] =
1838 $this->input[
"street"]->
setValue($ilUser->getStreet());
1839 $this->input[
"street"]->setMaxLength(40);
1840 $this->input[
"street"]->setSize(40);
1841 $this->form->addItem($this->input[
"street"]);
1847 $this->input[
"zipcode"] =
1849 $this->input[
"zipcode"]->
setValue($ilUser->getZipcode());
1850 $this->input[
"zipcode"]->setMaxLength(10);
1851 $this->input[
"zipcode"]->setSize(10);
1852 $this->form->addItem($this->input[
"zipcode"]);
1858 $this->input[
"city"] =
1860 $this->input[
"city"]->
setValue($ilUser->getCity());
1861 $this->input[
"city"]->setMaxLength(40);
1862 $this->input[
"city"]->setSize(40);
1863 $this->form->addItem($this->input[
"city"]);
1869 $this->input[
"country"] =
1871 $this->input[
"country"]->
setValue($ilUser->getCountry());
1872 $this->input[
"country"]->setMaxLength(40);
1873 $this->input[
"country"]->setSize(40);
1874 $this->form->addItem($this->input[
"country"]);
1880 $this->input[
"phone_office"] =
1881 new ilTextInputGUI($lng->txt(
"phone_office"),
"usr_phone_office");
1882 $this->input[
"phone_office"]->
setValue($ilUser->getPhoneOffice());
1883 $this->input[
"phone_office"]->setMaxLength(40);
1884 $this->input[
"phone_office"]->setSize(40);
1885 $this->form->addItem($this->input[
"phone_office"]);
1891 $this->input[
"phone_home"] =
1893 $this->input[
"phone_home"]->
setValue($ilUser->getPhoneHome());
1894 $this->input[
"phone_home"]->setMaxLength(40);
1895 $this->input[
"phone_home"]->setSize(40);
1896 $this->form->addItem($this->input[
"phone_home"]);
1902 $this->input[
"phone_mobile"] =
1903 new ilTextInputGUI($lng->txt(
"phone_mobile"),
"usr_phone_mobile");
1904 $this->input[
"phone_mobile"]->
setValue($ilUser->getPhoneMobile());
1905 $this->input[
"phone_mobile"]->setMaxLength(40);
1906 $this->input[
"phone_mobile"]->setSize(40);
1907 $this->form->addItem($this->input[
"phone_mobile"]);
1913 $this->input[
"fax"] =
1915 $this->input[
"fax"]->
setValue($ilUser->getFax());
1916 $this->input[
"fax"]->setMaxLength(40);
1917 $this->input[
"fax"]->setSize(40);
1918 $this->form->addItem($this->input[
"fax"]);
1924 $this->input[
"email"] =
1926 $this->input[
"email"]->
setValue($ilUser->getEmail());
1927 $this->input[
"email"]->setMaxLength(80);
1928 $this->input[
"email"]->setSize(40);
1929 $this->form->addItem($this->input[
"email"]);
1935 $this->input[
"hobby"] =
1937 $this->input[
"hobby"]->
setValue($ilUser->getHobby());
1938 $this->input[
"hobby"]->setRows(3);
1939 $this->input[
"hobby"]->setCols(45);
1940 $this->form->addItem($this->input[
"hobby"]);
1946 $this->input[
"referral_comment"] =
1948 $this->input[
"referral_comment"]->
setValue($ilUser->getComment());
1949 $this->input[
"referral_comment"]->setRows(3);
1950 $this->input[
"referral_comment"]->setCols(45);
1951 $this->form->addItem($this->input[
"referral_comment"]);
1958 $sh->setTitle($this->lng->txt(
"user_profile_instant_messengers"));
1959 $this->form->addItem($sh);
1961 $im_arr = array(
"icq",
"yahoo",
"msn",
"aim",
"skype");
1962 foreach ($im_arr as $im_name)
1964 $this->input[
"im_".$im_name] =
1965 new ilTextInputGUI($lng->txt(
"im_".$im_name),
"usr_im_".$im_name);
1966 $this->input[
"im_".$im_name]->
setValue($ilUser->getInstantMessengerId($im_name));
1967 $this->input[
"im_".$im_name]->setMaxLength(40);
1968 $this->input[
"im_".$im_name]->setSize(40);
1969 $this->form->addItem($this->input[
"im_".$im_name]);
1977 $sh->setTitle($this->lng->txt(
"user_profile_other"));
1978 $this->form->addItem($sh);
1984 $this->input[
"matriculation"] =
1985 new ilTextInputGUI($lng->txt(
"matriculation"),
"usr_matriculation");
1986 $this->input[
"matriculation"]->
setValue($ilUser->getMatriculation());
1987 $this->input[
"matriculation"]->setMaxLength(40);
1988 $this->input[
"matriculation"]->setSize(40);
1989 $this->form->addItem($this->input[
"matriculation"]);
1994 if ($d_set->get(
"user_profile") ==
"1")
1996 $this->input[
"delicious"] =
1998 $this->input[
"delicious"]->
setValue($ilUser->getDelicious());
1999 $this->input[
"delicious"]->setMaxLength(40);
2000 $this->input[
"delicious"]->setSize(40);
2001 $this->form->addItem($this->input[
"delicious"]);
2005 $user_defined_data = $ilUser->getUserDefinedData();
2006 foreach($this->user_defined_fields->getVisibleDefinitions() as $field_id => $definition)
2010 $this->input[
"udf_".$definition[
'field_id']] =
2011 new ilTextInputGUI($definition[
'field_name'],
"udf_".$definition[
'field_id']);
2012 $this->input[
"udf_".$definition[
'field_id']]->setValue($user_defined_data[$field_id]);
2013 $this->input[
"udf_".$definition[
'field_id']]->setMaxLength(255);
2014 $this->input[
"udf_".$definition[
'field_id']]->setSize(40);
2018 $this->input[
"udf_".$definition[
'field_id']] =
2019 new ilSelectInputGUI($definition[
'field_name'],
"udf_".$definition[
'field_id']);
2020 $this->input[
"udf_".$definition[
'field_id']]->setValue($user_defined_data[$field_id]);
2021 $this->input[
"udf_".$definition[
'field_id']]->setOptions(
2022 $this->user_defined_fields->fieldValuesToSelectArray($definition[
'field_values']));
2024 if(!$definition[
'changeable'])
2026 $this->input[
"udf_".$definition[
'field_id']]->setDisabled(
true);
2028 if($definition[
'required'])
2030 $this->input[
"udf_".$definition[
'field_id']]->setRequired(
true);
2032 $this->form->addItem($this->input[
"udf_".$definition[
'field_id']]);
2037 $sh->setTitle($lng->txt(
"settings"));
2038 $this->form->addItem($sh);
2044 $languages = $this->lng->getInstalledLanguages();
2047 $selected_lang = (isset($_POST[
"usr_language"]))
2048 ? $_POST[
"usr_language"]
2049 : $ilUser->getLanguage();
2051 $this->input[
"language"] =
new ilSelectInputGUI($lng->txt(
"language"),
"usr_language");
2055 foreach($languages as $lang_key)
2059 $this->input[
"language"]->setValue($selected_lang);
2060 $this->input[
"language"]->setOptions($langs);
2061 $this->form->addItem($this->input[
"language"]);
2065 include_once(
"./Services/Style/classes/class.ilObjStyleSettings.php");
2066 $templates = $styleDefinition->getAllTemplates();
2069 if (is_array($templates))
2072 foreach($templates as $template)
2076 $styleDef->startParsing();
2077 $styles = $styleDef->getStyles();
2078 $st_sel = $ilUser->skin.
":".$ilUser->prefs[
"style"];
2079 foreach($styles as $style)
2085 $st_arr[$template[
"id"].
":".$style[
"id"]] =
2086 $styleDef->getTemplateName().
" / ".$style[
"name"];
2089 $this->input[
"skin_style"] =
new ilSelectInputGUI($lng->txt(
"usr_skin_style"),
"usr_skin_style");
2090 $this->input[
"skin_style"]->
setValue($st_sel);
2091 $this->input[
"skin_style"]->setOptions($st_arr);
2092 $this->form->addItem($this->input[
"skin_style"]);
2099 $hits_options = array(2 => 2, 10 => 10, 15 => 15,
2100 20 => 20, 30 => 30, 40 => 40, 50 => 50,
2101 100 => 100, 9999 => $this->lng->txt(
"no_limit"));
2102 $this->input[
"hits_per_page"] =
new ilSelectInputGUI($lng->txt(
"hits_per_page"),
"hits_per_page");
2103 $this->input[
"hits_per_page"]->
setValue($ilUser->prefs[
"hits_per_page"]);
2104 $this->input[
"hits_per_page"]->setOptions($hits_options);
2105 $this->form->addItem($this->input[
"hits_per_page"]);
2111 $users_online_options = array(
2112 "y" => $this->lng->txt(
"users_online_show_y"),
2113 "associated" => $this->lng->txt(
"users_online_show_associated"),
2114 "n" => $this->lng->txt(
"users_online_show_n"));
2115 $this->input[
"show_users_online"] =
2117 $this->input[
"show_users_online"]->
setValue($ilUser->prefs[
"show_users_online"]);
2118 $this->input[
"show_users_online"]->setOptions($users_online_options);
2119 $this->form->addItem($this->input[
"show_users_online"]);
2125 if ($ilUser->prefs[
"hide_own_online_status"] ==
"y")
2127 $this->tpl->setVariable(
"CHK_HIDE_OWN_ONLINE_STATUS",
"checked");
2129 $this->input[
"hide_own_online_status"] =
2130 new ilCheckboxInputGUI($lng->txt(
"hide_own_online_status"),
"hide_own_online_status");
2131 $this->input[
"hide_own_online_status"]->
setValue(
"y");
2132 $this->input[
"hide_own_online_status"]->setChecked($ilUser->prefs[
"hide_own_online_status"] ==
"y");
2133 $this->form->addItem($this->input[
"hide_own_online_status"]);
2138 foreach ($this->input as $field => $val)
2140 if (!$ilSetting->get(
"usr_settings_hide_" . $field))
2142 if ($ilSetting->get(
"usr_settings_disable_" . $field))
2144 $this->input[$field]->setDisabled(
true);
2147 if (isset($this->settings[
"require_" . $field]) && $this->settings[
"require_" . $field])
2149 $this->input[$field]->setRequired(
true);
2154 $val_array = array(
"institution",
"department",
"upload",
"street",
2155 "zip",
"city",
"country",
"phone_office",
"phone_home",
"phone_mobile",
2156 "fax",
"email",
"hobby",
"matriculation");
2157 foreach ($val_array as $val)
2159 if (is_object($this->input[$val]))
2161 $this->input[
"chk_".$val] =
2163 $this->input[
"chk_".$val]->
setValue(
"y");
2164 $this->input[
"chk_".$val]->setChecked($ilUser->prefs[
"public_".$val] ==
"y");
2165 $this->input[$val]->addSubItem($this->input[
"chk_".$val]);
2166 $this->input[$val]->setSubformMode(
"right");