ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilPersonalSettingsGUI Class Reference

GUI class for personal profile. More...

+ Collaboration diagram for ilPersonalSettingsGUI:

Public Member Functions

 __construct ()
 constructor More...
 
executeCommand ()
 execute command More...
 
 setHeader ()
 Set header. More...
 
 showPassword ($a_no_init=false, $hide_form=false)
 
 initPasswordForm ()
 Init password form. More...
 
 savePassword ()
 Save password form. More...
 
 workWithUserSetting ($setting)
 Returns TRUE if working with the given user setting is allowed, FALSE otherwise. More...
 
 userSettingVisible ($setting)
 Returns TRUE if user setting is visible, FALSE otherwise. More...
 
 userSettingEnabled ($setting)
 Returns TRUE if user setting is enabled, FALSE otherwise. More...
 
 showGeneralSettings ($a_no_init=false)
 General settings form. More...
 
 initGeneralSettingsForm ()
 Init general settings form. More...
 
 saveGeneralSettings ()
 Save general settings. More...
 

Data Fields

 $tpl
 
 $lng
 
 $ilias
 
 $ctrl
 

Protected Member Functions

 allowPasswordChange ()
 Check, whether password change is allowed for user. More...
 
 deleteOwnAccount1 ()
 Delete own account dialog - 1st confirmation. More...
 
 deleteOwnAccount2 ()
 Delete own account dialog - login redirect. More...
 
 abortDeleteOwnAccount ()
 
 deleteOwnAccountLogout ()
 
 deleteOwnAccount3 ()
 Delete own account dialog - final confirmation. More...
 
 deleteOwnAccount4 ()
 Delete own account dialog - action incl. More...
 

Private Member Functions

 initMailOptionsForm ()
 Initialises the mail options form. More...
 
 setMailOptionsValuesByDB ()
 Fetches data from model and loads this data into form. More...
 

Detailed Description

GUI class for personal profile.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$ @ilCtrl_Calls ilPersonalSettingsGUI:

Definition at line 11 of file class.ilPersonalSettingsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilPersonalSettingsGUI::__construct ( )

constructor

Definition at line 21 of file class.ilPersonalSettingsGUI.php.

22 {
23 global $ilias, $tpl, $lng, $rbacsystem, $ilCtrl;
24
25 include_once './Services/User/classes/class.ilUserDefinedFields.php';
26 $this->user_defined_fields =& ilUserDefinedFields::_getInstance();
27
28 $this->tpl =& $tpl;
29 $this->lng =& $lng;
30 $this->ilias =& $ilias;
31 $this->ctrl =& $ilCtrl;
32 $this->settings = $ilias->getAllSettings();
33// $lng->loadLanguageModule("jsmath");
34 $lng->loadLanguageModule('chatroom');
35 $lng->loadLanguageModule('chatroom_adm');
36 $this->upload_error = "";
37 $this->password_error = "";
38 $lng->loadLanguageModule("user");
39 $ilCtrl->saveParameter($this, "user_page");
40 }
static _getInstance()
Get instance.
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file)

References $ilCtrl, $ilias, $lng, $tpl, and ilUserDefinedFields\_getInstance().

+ Here is the call graph for this function:

Member Function Documentation

◆ abortDeleteOwnAccount()

ilPersonalSettingsGUI::abortDeleteOwnAccount ( )
protected

Definition at line 1254 of file class.ilPersonalSettingsGUI.php.

1255 {
1256 global $ilCtrl, $ilUser;
1257
1258 $ilUser->removeDeletionFlag();
1259
1260 ilUtil::sendInfo($this->lng->txt("user_delete_own_account_aborted"), true);
1261 $ilCtrl->redirect($this, "showGeneralSettings");
1262 }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
global $ilUser
Definition: imgupload.php:15

References $ilCtrl, $ilUser, and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ allowPasswordChange()

ilPersonalSettingsGUI::allowPasswordChange ( )
protected

Check, whether password change is allowed for user.

Definition at line 591 of file class.ilPersonalSettingsGUI.php.

592 {
593 global $ilUser;
594
595 if (\ilSession::get('used_external_auth')) {
596 return false;
597 }
598
599 $status = ilAuthUtils::isPasswordModificationEnabled($ilUser->getAuthMode(true));
600 if ($status) {
601 return true;
602 }
603
604 return \ilAuthUtils::isPasswordModificationHidden() && ($ilUser->isPasswordChangeDemanded() || $ilUser->isPasswordExpired());
605 }
static isPasswordModificationEnabled($a_authmode)
Check if password modification is enabled.
static get($a_var)
Get a value.

References $ilUser, ilSession\get(), and ilAuthUtils\isPasswordModificationEnabled().

Referenced by initPasswordForm(), and savePassword().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteOwnAccount1()

ilPersonalSettingsGUI::deleteOwnAccount1 ( )
protected

Delete own account dialog - 1st confirmation.

Definition at line 1203 of file class.ilPersonalSettingsGUI.php.

1204 {
1205 global $ilTabs, $ilToolbar, $ilUser, $ilSetting;
1206
1207 if(!(bool)$ilSetting->get('user_delete_own_account') ||
1208 $ilUser->getId() == SYSTEM_USER_ID)
1209 {
1210 $this->ctrl->redirect($this, "showGeneralSettings");
1211 }
1212
1213 // too make sure
1214 $ilUser->removeDeletionFlag();
1215
1216 $this->setHeader();
1217 $this->__initSubTabs("deleteOwnAccount");
1218 $ilTabs->activateTab("delacc");
1219
1220 ilUtil::sendInfo($this->lng->txt('user_delete_own_account_info'));
1221 $ilToolbar->addButton($this->lng->txt('btn_next'),
1222 $this->ctrl->getLinkTarget($this, 'deleteOwnAccount2'));
1223
1224 $this->tpl->show();
1225 }
global $ilSetting
Definition: privfeed.php:40

References $ilSetting, $ilUser, ilUtil\sendInfo(), and setHeader().

+ Here is the call graph for this function:

◆ deleteOwnAccount2()

ilPersonalSettingsGUI::deleteOwnAccount2 ( )
protected

Delete own account dialog - login redirect.

Definition at line 1230 of file class.ilPersonalSettingsGUI.php.

1231 {
1232 global $ilTabs, $ilUser, $ilSetting;
1233
1234 if(!(bool)$ilSetting->get('user_delete_own_account') ||
1235 $ilUser->getId() == SYSTEM_USER_ID)
1236 {
1237 $this->ctrl->redirect($this, "showGeneralSettings");
1238 }
1239
1240 $this->setHeader();
1241 $this->__initSubTabs("deleteOwnAccount");
1242 $ilTabs->activateTab("delacc");
1243
1244 include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
1245 $cgui = new ilConfirmationGUI();
1246 $cgui->setHeaderText($this->lng->txt('user_delete_own_account_logout_confirmation'));
1247 $cgui->setFormAction($this->ctrl->getFormAction($this));
1248 $cgui->setCancel($this->lng->txt("cancel"), "abortDeleteOwnAccount");
1249 $cgui->setConfirm($this->lng->txt("user_delete_own_account_logout_button"), "deleteOwnAccountLogout");
1250 $this->tpl->setContent($cgui->getHTML());
1251 $this->tpl->show();
1252 }
Confirmation screen class.

References $ilSetting, $ilUser, and setHeader().

+ Here is the call graph for this function:

◆ deleteOwnAccount3()

ilPersonalSettingsGUI::deleteOwnAccount3 ( )
protected

Delete own account dialog - final confirmation.

Definition at line 1283 of file class.ilPersonalSettingsGUI.php.

1284 {
1285 global $ilTabs, $ilUser, $ilSetting;
1286
1287 if(!(bool)$ilSetting->get('user_delete_own_account') ||
1288 $ilUser->getId() == SYSTEM_USER_ID ||
1289 !$ilUser->hasDeletionFlag())
1290 {
1291 $this->ctrl->redirect($this, "showGeneralSettings");
1292 }
1293
1294 $this->setHeader();
1295 $this->__initSubTabs("deleteOwnAccount");
1296 $ilTabs->activateTab("delacc");
1297
1298 include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
1299 $cgui = new ilConfirmationGUI();
1300 $cgui->setHeaderText($this->lng->txt('user_delete_own_account_final_confirmation'));
1301 $cgui->setFormAction($this->ctrl->getFormAction($this));
1302 $cgui->setCancel($this->lng->txt("cancel"), "abortDeleteOwnAccount");
1303 $cgui->setConfirm($this->lng->txt("confirm"), "deleteOwnAccount4");
1304 $this->tpl->setContent($cgui->getHTML());
1305 $this->tpl->show();
1306 }

References $ilSetting, $ilUser, and setHeader().

+ Here is the call graph for this function:

◆ deleteOwnAccount4()

ilPersonalSettingsGUI::deleteOwnAccount4 ( )
protected

Delete own account dialog - action incl.

notification email

Definition at line 1311 of file class.ilPersonalSettingsGUI.php.

1312 {
1313 global $ilUser, $ilAuth, $ilSetting, $ilLog;
1314
1315 if(!(bool)$ilSetting->get('user_delete_own_account') ||
1316 $ilUser->getId() == SYSTEM_USER_ID ||
1317 !$ilUser->hasDeletionFlag())
1318 {
1319 $this->ctrl->redirect($this, "showGeneralSettings");
1320 }
1321
1322 // build notification
1323
1324 include_once "./Services/Notification/classes/class.ilSystemNotification.php";
1325 $ntf = new ilSystemNotification();
1326 $ntf->setLangModules(array("user"));
1327 $ntf->addAdditionalInfo("profile", $ilUser->getProfileAsString($this->lng), true);
1328
1329 // mail message
1331 $ntf->setIntroductionDirect(
1332 sprintf($this->lng->txt("user_delete_own_account_email_body"),
1333 $ilUser->getLogin(),
1334 ILIAS_HTTP_PATH,
1336
1337 $message = $ntf->composeAndGetMessage($ilUser->getId(), null, null, true);
1338 $subject = $this->lng->txt("user_delete_own_account_email_subject");
1339
1340
1341 // send notification
1342
1343 include_once "Services/Mail/classes/class.ilMail.php";
1344 $mail = new ilMail(ANONYMOUS_USER_ID);
1345
1346 $user_email = $ilUser->getEmail();
1347 $admin_mail = $ilSetting->get("user_delete_own_account_email");
1348
1349 // to user, admin as bcc
1350 if($user_email)
1351 {
1352 $mail->sendMimeMail($user_email, null, $admin_mail, $subject, $message, null, true);
1353 }
1354 // admin only
1355 else if($admin_mail)
1356 {
1357 $mail->sendMimeMail($admin_mail, null, null, $subject, $message, null, true);
1358 }
1359
1360 $ilLog->write("Account deleted: ".$ilUser->getLogin()." (".$ilUser->getId().")");
1361
1362 $ilUser->delete();
1363
1364 // terminate session
1365 $ilAuth->logout();
1366 session_destroy();
1367
1368 ilUtil::redirect("login.php?accdel=1");
1369 }
const IL_CAL_UNIX
static setUseRelativeDates($a_status)
set use relative dates
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
Class Mail this class handles base functions for mail handling.
Wrapper classes for system notifications.
static redirect($a_script)
http redirect to other script

References $ilLog, $ilSetting, $ilUser, ilDatePresentation\formatDate(), IL_CAL_UNIX, ilUtil\redirect(), and ilDatePresentation\setUseRelativeDates().

+ Here is the call graph for this function:

◆ deleteOwnAccountLogout()

ilPersonalSettingsGUI::deleteOwnAccountLogout ( )
protected

Definition at line 1264 of file class.ilPersonalSettingsGUI.php.

1265 {
1266 global $ilAuth, $ilUser;
1267
1268 // we are setting the flag and ending the session in the same step
1269
1270 $ilUser->activateDeletionFlag();
1271
1272 // see ilStartupGUI::showLogout()
1274 $ilAuth->logout();
1275 session_destroy();
1276
1277 ilUtil::redirect("login.php?target=usr_".md5("usrdelown"));
1278 }
const SESSION_CLOSE_USER
static setClosingContext($a_context)
set closing context (for statistics)

References $ilUser, ilUtil\redirect(), ilSession\SESSION_CLOSE_USER, and ilSession\setClosingContext().

+ Here is the call graph for this function:

◆ executeCommand()

& ilPersonalSettingsGUI::executeCommand ( )

execute command

Definition at line 45 of file class.ilPersonalSettingsGUI.php.

46 {
47 global $ilUser, $ilCtrl, $tpl, $ilTabs, $lng;
48
49 $next_class = $this->ctrl->getNextClass();
50
51 switch($next_class)
52 {
53
54 default:
55 $cmd = $this->ctrl->getCmd("showGeneralSettings");
56 $this->$cmd();
57 break;
58 }
59 return true;
60 }
$cmd
Definition: sahs_server.php:35

References $cmd, $ilCtrl, $ilUser, $lng, and $tpl.

◆ initGeneralSettingsForm()

ilPersonalSettingsGUI::initGeneralSettingsForm ( )

Init general settings form.

Definition at line 791 of file class.ilPersonalSettingsGUI.php.

792 {
793 global $lng, $ilUser, $styleDefinition, $ilSetting;
794
795
796 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
797 $this->form = new ilPropertyFormGUI();
798
799 // language
800 if ($this->userSettingVisible("language"))
801 {
802 $languages = $this->lng->getInstalledLanguages();
803 $options = array();
804 foreach($languages as $lang_key)
805 {
806 $options[$lang_key] = ilLanguage::_lookupEntry($lang_key,"meta", "meta_l_".$lang_key);
807 }
808
809 $si = new ilSelectInputGUI($this->lng->txt("language"), "language");
810 $si->setOptions($options);
811 $si->setValue($ilUser->getLanguage());
812 $si->setDisabled($ilSetting->get("usr_settings_disable_language"));
813 $this->form->addItem($si);
814 }
815
816 // skin/style
817 include_once("./Services/Style/classes/class.ilObjStyleSettings.php");
818 if ($this->userSettingVisible("skin_style"))
819 {
820 $templates = $styleDefinition->getAllTemplates();
821 if (is_array($templates))
822 {
823 $si = new ilSelectInputGUI($this->lng->txt("skin_style"), "skin_style");
824
825 $options = array();
826 foreach($templates as $template)
827 {
828 // get styles information of template
829 $styleDef = new ilStyleDefinition($template["id"]);
830 $styleDef->startParsing();
831 $styles = $styleDef->getStyles();
832
833 foreach($styles as $style)
834 {
835 if (!ilObjStyleSettings::_lookupActivatedStyle($template["id"],$style["id"]))
836 {
837 continue;
838 }
839
840 $options[$template["id"].":".$style["id"]] =
841 $styleDef->getTemplateName()." / ".$style["name"];
842 }
843 }
844 $si->setOptions($options);
845 $si->setValue($ilUser->skin.":".$ilUser->prefs["style"]);
846 $si->setDisabled($ilSetting->get("usr_settings_disable_skin_style"));
847 $this->form->addItem($si);
848 }
849 }
850
851 // screen reader optimization
852 if ($this->userSettingVisible("screen_reader_optimization"))
853 {
854 $cb = new ilCheckboxInputGUI($this->lng->txt("user_screen_reader_optimization"), "screen_reader_optimization");
855 $cb->setChecked($ilUser->prefs["screen_reader_optimization"]);
856 $cb->setDisabled($ilSetting->get("usr_settings_disable_screen_reader_optimization"));
857 $cb->setInfo($this->lng->txt("user_screen_reader_optimization_info"));
858 $this->form->addItem($cb);
859 }
860
861 // hits per page
862 if ($this->userSettingVisible("hits_per_page"))
863 {
864 $si = new ilSelectInputGUI($this->lng->txt("hits_per_page"), "hits_per_page");
865
866 $hits_options = array(10,15,20,30,40,50,100,9999);
867 $options = array();
868
869 foreach($hits_options as $hits_option)
870 {
871 $hstr = ($hits_option == 9999)
872 ? $this->lng->txt("no_limit")
873 : $hits_option;
874 $options[$hits_option] = $hstr;
875 }
876 $si->setOptions($options);
877 $si->setValue($ilUser->prefs["hits_per_page"]);
878 $si->setDisabled($ilSetting->get("usr_settings_disable_hits_per_page"));
879 $this->form->addItem($si);
880 }
881
882 // Users Online
883 /*
884 if ($this->userSettingVisible("show_users_online"))
885 {
886 $si = new ilSelectInputGUI($this->lng->txt("show_users_online"), "show_users_online");
887
888 $options = array(
889 "y" => $this->lng->txt("users_online_show_y"),
890 "associated" => $this->lng->txt("users_online_show_associated"),
891 "n" => $this->lng->txt("users_online_show_n"));
892 $si->setOptions($options);
893 $si->setValue($ilUser->prefs["show_users_online"]);
894 $si->setDisabled($ilSetting->get("usr_settings_disable_show_users_online"));
895 $this->form->addItem($si);
896 }*/
897
898 // Store last visited
899 $lv = new ilSelectInputGUI($this->lng->txt("user_store_last_visited"), "store_last_visited");
900 $options = array(
901 0 => $this->lng->txt("user_lv_keep_entries"),
902 1 => $this->lng->txt("user_lv_keep_only_for_session"),
903 2 => $this->lng->txt("user_lv_do_not_store"));
904 $lv->setOptions($options);
905 $lv->setValue((int) $ilUser->prefs["store_last_visited"]);
906 $this->form->addItem($lv);
907
908 // hide_own_online_status
909 $awrn_set = new ilSetting("awrn");
910 if ($awrn_set->get("awrn_enabled", false) && $this->userSettingVisible("hide_own_online_status"))
911 {
912 $this->lng->loadLanguageModule("awrn");
913 $cb = new ilCheckboxInputGUI($this->lng->txt("awrn_hide_from_awareness"), "hide_own_online_status");
914 $cb->setInfo($this->lng->txt("awrn_hide_from_awareness_info"));
915 $cb->setChecked($ilUser->prefs["hide_own_online_status"] == "y");
916 $cb->setDisabled($ilSetting->get("usr_settings_disable_hide_own_online_status"));
917 $this->form->addItem($cb);
918 }
919
920 require_once 'Services/Contact/BuddySystem/classes/class.ilBuddySystem.php';
921 if(ilBuddySystem::getInstance()->isEnabled() && $this->userSettingVisible('bs_allow_to_contact_me'))
922 {
923 $this->lng->loadLanguageModule('buddysystem');
924 $allow_to_contact_be = new ilCheckboxInputGUI($this->lng->txt('buddy_allow_to_contact_me'), 'bs_allow_to_contact_me');
925 $allow_to_contact_be->setInfo($this->lng->txt('buddy_allow_to_contact_me_info'));
926 $allow_to_contact_be->setChecked($ilUser->prefs['bs_allow_to_contact_me'] == 'y');
927 $allow_to_contact_be->setDisabled($ilSetting->get('usr_settings_disable_bs_allow_to_contact_me'));
928 $this->form->addItem($allow_to_contact_be);
929 }
930
931 include_once 'Services/Authentication/classes/class.ilSessionReminder.php';
932 if(ilSessionReminder::isGloballyActivated())
933 {
934 $cb = new ilCheckboxInputGUI($this->lng->txt('session_reminder'), 'session_reminder_enabled');
935 $cb->setInfo($this->lng->txt('session_reminder_info'));
936 $cb->setValue(1);
937 $cb->setChecked((int)$ilUser->getPref('session_reminder_enabled'));
938
940 $lead_time_gui = new ilNumberInputGUI($this->lng->txt('session_reminder_lead_time'), 'session_reminder_lead_time');
941 $lead_time_gui->setInfo(sprintf($this->lng->txt('session_reminder_lead_time_info'), ilFormat::_secondsToString($expires, true)));
942
944 $max_value = max($min_value, ((int)$expires / 60) - 1);
945
946 $current_user_value = $ilUser->getPref('session_reminder_lead_time');
947 if($current_user_value < $min_value ||
948 $current_user_value > $max_value)
949 {
950 $current_user_value = ilSessionReminder::SUGGESTED_LEAD_TIME;
951 }
952 $value = min(
953 max(
954 $min_value, $current_user_value
955 ),
956 $max_value
957 );
958
959 $lead_time_gui->setValue($value);
960 $lead_time_gui->setSize(3);
961 $lead_time_gui->setMinValue($min_value);
962 $lead_time_gui->setMaxValue($max_value);
963 $cb->addSubItem($lead_time_gui);
964
965 $this->form->addItem($cb);
966 }
967
968 // calendar settings (copied here to be reachable when calendar is inactive)
969 // they cannot be hidden/deactivated
970
971 include_once('Services/Calendar/classes/class.ilCalendarUserSettings.php');
972 include_once('Services/Calendar/classes/class.ilCalendarUtil.php');
973 $lng->loadLanguageModule("dateplaner");
974 $user_settings = ilCalendarUserSettings::_getInstanceByUserId($ilUser->getId());
975
976 $select = new ilSelectInputGUI($lng->txt('cal_user_timezone'),'timezone');
977 $select->setOptions(ilCalendarUtil::_getShortTimeZoneList());
978 $select->setInfo($lng->txt('cal_timezone_info'));
979 $select->setValue($user_settings->getTimeZone());
980 $this->form->addItem($select);
981
982 $year = date("Y");
983 $select = new ilSelectInputGUI($lng->txt('cal_user_date_format'),'date_format');
984 $select->setOptions(array(
985 ilCalendarSettings::DATE_FORMAT_DMY => '31.10.'.$year,
986 ilCalendarSettings::DATE_FORMAT_YMD => $year."-10-31",
987 ilCalendarSettings::DATE_FORMAT_MDY => "10/31/".$year));
988 $select->setInfo($lng->txt('cal_date_format_info'));
989 $select->setValue($user_settings->getDateFormat());
990 $this->form->addItem($select);
991
992 $select = new ilSelectInputGUI($lng->txt('cal_user_time_format'),'time_format');
993 $select->setOptions(array(
996 $select->setInfo($lng->txt('cal_time_format_info'));
997 $select->setValue($user_settings->getTimeFormat());
998 $this->form->addItem($select);
999
1000
1001 // starting point
1002 include_once "Services/User/classes/class.ilUserUtil.php";
1004 {
1005 $this->lng->loadLanguageModule("administration");
1006 $si = new ilRadioGroupInputGUI($this->lng->txt("adm_user_starting_point"), "usr_start");
1007 $si->setRequired(true);
1008 $si->setInfo($this->lng->txt("adm_user_starting_point_info"));
1009 $def_opt = new ilRadioOption($this->lng->txt("adm_user_starting_point_inherit"), 0);
1010 $def_opt->setInfo($this->lng->txt("adm_user_starting_point_inherit_info"));
1011 $si->addOption($def_opt);
1012 foreach(ilUserUtil::getPossibleStartingPoints() as $value => $caption)
1013 {
1014 $si->addOption(new ilRadioOption($caption, $value));
1015 }
1018 : 0);
1019 $this->form->addItem($si);
1020
1021 // starting point: repository object
1022 $repobj = new ilRadioOption($lng->txt("adm_user_starting_point_object"), ilUserUtil::START_REPOSITORY_OBJ);
1023 $repobj_id = new ilTextInputGUI($lng->txt("adm_user_starting_point_ref_id"), "usr_start_ref_id");
1024 $repobj_id->setInfo($lng->txt("adm_user_starting_point_ref_id_info"));
1025 $repobj_id->setRequired(true);
1026 $repobj_id->setSize(5);
1027 if($si->getValue() == ilUserUtil::START_REPOSITORY_OBJ)
1028 {
1029 $start_ref_id = ilUserUtil::getPersonalStartingObject();
1030 $repobj_id->setValue($start_ref_id);
1031 if($start_ref_id)
1032 {
1033 $start_obj_id = ilObject::_lookupObjId($start_ref_id);
1034 if($start_obj_id)
1035 {
1036 $repobj_id->setInfo($lng->txt("obj_".ilObject::_lookupType($start_obj_id)).
1037 ": ".ilObject::_lookupTitle($start_obj_id));
1038 }
1039 }
1040 }
1041 $repobj->addSubItem($repobj_id);
1042 $si->addOption($repobj);
1043 }
1044
1045 // selector for unicode characters
1046 global $ilSetting;
1047 if ($ilSetting->get('char_selector_availability') > 0)
1048 {
1049 require_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
1051 $char_selector->getConfig()->setAvailability($ilUser->getPref('char_selector_availability'));
1052 $char_selector->getConfig()->setDefinition($ilUser->getPref('char_selector_definition'));
1053 $char_selector->addFormProperties($this->form);
1054 $char_selector->setFormValues($this->form);
1055 }
1056
1057 $this->form->addCommandButton("saveGeneralSettings", $lng->txt("save"));
1058 $this->form->setTitle($lng->txt("general_settings"));
1059 $this->form->setFormAction($this->ctrl->getFormAction($this));
1060
1061 }
static _getInstanceByUserId($a_user_id)
get singleton instance
static _getShortTimeZoneList()
get short timezone list
This shows a character selector.
This class represents a checkbox property in a property form.
_secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
static _lookupEntry($a_lang_key, $a_mod, $a_id)
This class represents a number property in a property form.
_lookupActivatedStyle($a_skin, $a_style)
lookup if a style is activated
static _lookupObjId($a_id)
userSettingVisible($setting)
Returns TRUE if user setting is visible, FALSE otherwise.
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a selection list property in a property form.
static getSessionExpireValue()
Returns the session expiration value.
ILIAS Setting Class.
parses the template.xml that defines all styles of the current template
This class represents a text property in a property form.
static getPersonalStartingObject()
Get ref id of personal starting object.
static getPossibleStartingPoints($a_force_all=false)
Get all valid starting points.
static hasPersonalStartPointPref()
Did user set any personal starting point (yet)?
static hasPersonalStartingPoint()
Can starting point be personalized?
static getPersonalStartingPoint()
Get current personal starting point.
const START_REPOSITORY_OBJ
$style
Definition: example_012.php:70
if(!is_array($argv)) $options

References $ilSetting, $ilUser, $lng, $options, $si, $style, ilCalendarUserSettings\_getInstanceByUserId(), ilCalendarUtil\_getShortTimeZoneList(), ilObjStyleSettings\_lookupActivatedStyle(), ilLanguage\_lookupEntry(), ilObject\_lookupObjId(), ilFormat\_secondsToString(), ilCharSelectorConfig\CONTEXT_USER, ilCalendarSettings\DATE_FORMAT_DMY, ilCalendarSettings\DATE_FORMAT_MDY, ilCalendarSettings\DATE_FORMAT_YMD, ilBuddySystem\getInstance(), ilUserUtil\getPersonalStartingObject(), ilUserUtil\getPersonalStartingPoint(), ilUserUtil\getPossibleStartingPoints(), ilSession\getSessionExpireValue(), ilUserUtil\hasPersonalStartingPoint(), ilUserUtil\hasPersonalStartPointPref(), ilSessionReminder\MIN_LEAD_TIME, ilUserUtil\START_REPOSITORY_OBJ, ilSessionReminder\SUGGESTED_LEAD_TIME, ilCalendarSettings\TIME_FORMAT_12, ilCalendarSettings\TIME_FORMAT_24, and userSettingVisible().

Referenced by saveGeneralSettings(), and showGeneralSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initMailOptionsForm()

ilPersonalSettingsGUI::initMailOptionsForm ( )
private

Initialises the mail options form.

Definition at line 129 of file class.ilPersonalSettingsGUI.php.

130 {
131 global $ilCtrl, $ilSetting, $lng, $ilUser;
132
133 include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
134 $this->form = new ilPropertyFormGUI();
135
136 $this->form->setFormAction($ilCtrl->getFormAction($this, 'saveMailOptions'));
137 $this->form->setTitle($lng->txt('mail_settings'));
138
139 // BEGIN INCOMING
140 include_once 'Services/Mail/classes/class.ilMailOptions.php';
141 if($ilSetting->get('usr_settings_hide_mail_incoming_mail') != '1')
142 {
143 $options = array(
144 IL_MAIL_LOCAL => $this->lng->txt('mail_incoming_local'),
145 IL_MAIL_EMAIL => $this->lng->txt('mail_incoming_smtp'),
146 IL_MAIL_BOTH => $this->lng->txt('mail_incoming_both')
147 );
148 $si = new ilSelectInputGUI($lng->txt('mail_incoming'), 'incoming_type');
149 $si->setOptions($options);
150 if(!strlen(ilObjUser::_lookupEmail($ilUser->getId())) ||
151 $ilSetting->get('usr_settings_disable_mail_incoming_mail') == '1')
152 {
153 $si->setDisabled(true);
154 }
155 $this->form->addItem($si);
156 }
157
158 // BEGIN LINEBREAK_OPTIONS
159 $options = array();
160 for($i = 50; $i <= 80; $i++)
161 {
162 $options[$i] = $i;
163 }
164 $si = new ilSelectInputGUI($lng->txt('linebreak'), 'linebreak');
165 $si->setOptions($options);
166 $this->form->addItem($si);
167
168 // BEGIN SIGNATURE
169 $ta = new ilTextAreaInputGUI($lng->txt('signature'), 'signature');
170 $ta->setRows(10);
171 $ta->setCols(60);
172 $this->form->addItem($ta);
173
174 // BEGIN CRONJOB NOTIFICATION
175 if($ilSetting->get('mail_notification'))
176 {
177 $cb = new ilCheckboxInputGUI($lng->txt('cron_mail_notification'), 'cronjob_notification');
178 $cb->setInfo($lng->txt('mail_cronjob_notification_info'));
179 $cb->setValue(1);
180 $this->form->addItem($cb);
181 }
182
183 $this->form->addCommandButton('saveMailOptions', $lng->txt('save'));
184 }
const IL_MAIL_BOTH
const IL_MAIL_LOCAL
const IL_MAIL_EMAIL
_lookupEmail($a_user_id)
Lookup email.
This class represents a text area property in a property form.

References $ilCtrl, $ilSetting, $ilUser, $lng, $options, $si, ilObjUser\_lookupEmail(), IL_MAIL_BOTH, IL_MAIL_EMAIL, and IL_MAIL_LOCAL.

+ Here is the call graph for this function:

◆ initPasswordForm()

ilPersonalSettingsGUI::initPasswordForm ( )

Init password form.

Parameters
int$a_modeEdit Mode

Definition at line 513 of file class.ilPersonalSettingsGUI.php.

514 {
515 global $lng, $ilUser, $ilSetting;
516
517 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
518 $this->form = new ilPropertyFormGUI();
519
520 // Check whether password change is allowed
521 if ($this->allowPasswordChange())
522 {
523 // The current password needs to be checked for verification
524 // unless the user uses Shibboleth authentication with additional
525 // local authentication for WebDAV.
526 //if (
527 // ($ilUser->getAuthMode(true) != AUTH_SHIBBOLETH || !$ilSetting->get("shib_auth_allow_local"))
528 //)
529 if($ilUser->getAuthMode(true) == AUTH_LOCAL)
530 {
531 // current password
532 $cpass = new ilPasswordInputGUI($lng->txt("current_password"), "current_password");
533 $cpass->setRetype(false);
534 $cpass->setSkipSyntaxCheck(true);
535 // only if a password exists.
536 if($ilUser->getPasswd())
537 {
538 $cpass->setRequired(true);
539 }
540 $this->form->addItem($cpass);
541 }
542
543 // new password
544 $ipass = new ilPasswordInputGUI($lng->txt("desired_password"), "new_password");
545 $ipass->setRequired(true);
546 $ipass->setInfo(ilUtil::getPasswordRequirementsInfo());
547
548 if ($ilSetting->get("passwd_auto_generate") == 1) // auto generation list
549 {
550 $ipass->setPreSelection(true);
551
552 $this->form->addItem($ipass);
553 $this->form->addCommandButton("savePassword", $lng->txt("save"));
554 $this->form->addCommandButton("showPassword", $lng->txt("new_list_password"));
555 }
556 else // user enters password
557 {
558 $this->form->addItem($ipass);
559 $this->form->addCommandButton("savePassword", $lng->txt("save"));
560 }
561
562 switch ($ilUser->getAuthMode(true))
563 {
564 case AUTH_LOCAL :
565 $this->form->setTitle($lng->txt("chg_password"));
566 break;
567
568 case AUTH_SHIBBOLETH :
569 case AUTH_CAS:
570 require_once 'Services/WebDAV/classes/class.ilDAVServer.php';
572 {
573 $this->form->setTitle($lng->txt("chg_ilias_and_webfolder_password"));
574 }
575 else
576 {
577 $this->form->setTitle($lng->txt("chg_ilias_password"));
578 }
579 break;
580 default :
581 $this->form->setTitle($lng->txt("chg_ilias_password"));
582 break;
583 }
584 $this->form->setFormAction($this->ctrl->getFormAction($this));
585 }
586 }
const AUTH_SHIBBOLETH
const AUTH_LOCAL
const AUTH_CAS
static _isActive()
Static getter.
This class represents a password property in a property form.
allowPasswordChange()
Check, whether password change is allowed for user.
static getPasswordRequirementsInfo()

References $ilSetting, $ilUser, $lng, ilDAVServer\_isActive(), allowPasswordChange(), AUTH_CAS, AUTH_LOCAL, AUTH_SHIBBOLETH, and ilUtil\getPasswordRequirementsInfo().

Referenced by savePassword(), and showPassword().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveGeneralSettings()

ilPersonalSettingsGUI::saveGeneralSettings ( )

Save general settings.

Definition at line 1066 of file class.ilPersonalSettingsGUI.php.

1067 {
1068 global $tpl, $lng, $ilCtrl, $ilUser;
1069
1070 $this->initGeneralSettingsForm();
1071 if ($this->form->checkInput())
1072 {
1073 if ($this->workWithUserSetting("skin_style"))
1074 {
1075 //set user skin and style
1076 if ($_POST["skin_style"] != "")
1077 {
1078 $sknst = explode(":", $_POST["skin_style"]);
1079
1080 if ($ilUser->getPref("style") != $sknst[1] ||
1081 $ilUser->getPref("skin") != $sknst[0])
1082 {
1083 $ilUser->setPref("skin", $sknst[0]);
1084 $ilUser->setPref("style", $sknst[1]);
1085 }
1086 }
1087 }
1088
1089 // language
1090 if ($this->workWithUserSetting("language"))
1091 {
1092 $ilUser->setLanguage($_POST["language"]);
1093 }
1094
1095 // hits per page
1096 if ($this->workWithUserSetting("hits_per_page"))
1097 {
1098 if ($_POST["hits_per_page"] != "")
1099 {
1100 $ilUser->setPref("hits_per_page",$_POST["hits_per_page"]);
1101 }
1102 }
1103
1104 // set show users online
1105 /*
1106 if ($this->workWithUserSetting("show_users_online"))
1107 {
1108 $ilUser->setPref("show_users_online", $_POST["show_users_online"]);
1109 }*/
1110
1111 // store last visited?
1112 global $ilNavigationHistory;
1113 $ilUser->setPref("store_last_visited", (int) $_POST["store_last_visited"]);
1114 if ((int) $_POST["store_last_visited"] > 0)
1115 {
1116 $ilNavigationHistory->deleteDBEntries();
1117 if ((int) $_POST["store_last_visited"] == 2)
1118 {
1119 $ilNavigationHistory->deleteSessionEntries();
1120 }
1121 }
1122
1123 // set hide own online_status
1124 if ($this->workWithUserSetting("hide_own_online_status"))
1125 {
1126 if ($_POST["hide_own_online_status"] == 1)
1127 {
1128 $ilUser->setPref("hide_own_online_status","y");
1129 }
1130 else
1131 {
1132 $ilUser->setPref("hide_own_online_status","n");
1133 }
1134 }
1135
1136 require_once 'Services/Contact/BuddySystem/classes/class.ilBuddySystem.php';
1137 if(ilBuddySystem::getInstance()->isEnabled() && $this->workWithUserSetting('bs_allow_to_contact_me'))
1138 {
1139 if(isset($_POST['bs_allow_to_contact_me']) && $_POST['bs_allow_to_contact_me'] == 1)
1140 {
1141 $ilUser->setPref('bs_allow_to_contact_me', 'y');
1142 }
1143 else
1144 {
1145 $ilUser->setPref('bs_allow_to_contact_me', 'n');
1146 }
1147 }
1148
1149 // set show users online
1150 if ($this->workWithUserSetting("screen_reader_optimization"))
1151 {
1152 $ilUser->setPref("screen_reader_optimization", $_POST["screen_reader_optimization"]);
1153 }
1154
1155 // session reminder
1156 include_once 'Services/Authentication/classes/class.ilSessionReminder.php';
1157 if(ilSessionReminder::isGloballyActivated())
1158 {
1159 $ilUser->setPref('session_reminder_enabled', (int)$this->form->getInput('session_reminder_enabled'));
1160 $ilUser->setPref('session_reminder_lead_time', $this->form->getInput('session_reminder_lead_time'));
1161 }
1162
1163 // starting point
1164 include_once "Services/User/classes/class.ilUserUtil.php";
1166 {
1167 ilUserUtil::setPersonalStartingPoint($this->form->getInput('usr_start'),
1168 $this->form->getInput('usr_start_ref_id'));
1169 }
1170
1171 // selector for unicode characters
1172 global $ilSetting;
1173 if ($ilSetting->get('char_selector_availability') > 0)
1174 {
1175 require_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
1177 $char_selector->getFormValues($this->form);
1178 $ilUser->setPref('char_selector_availability', $char_selector->getConfig()->getAvailability());
1179 $ilUser->setPref('char_selector_definition', $char_selector->getConfig()->getDefinition());
1180 }
1181
1182 $ilUser->update();
1183
1184 // calendar settings
1185 include_once('Services/Calendar/classes/class.ilCalendarUserSettings.php');
1186 $user_settings = ilCalendarUserSettings::_getInstanceByUserId($ilUser->getId());
1187 $user_settings->setTimeZone($this->form->getInput("timezone"));
1188 $user_settings->setDateFormat((int)$this->form->getInput("date_format"));
1189 $user_settings->setTimeFormat((int)$this->form->getInput("time_format"));
1190 $user_settings->save();
1191
1192 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1193 $ilCtrl->redirect($this, "showGeneralSettings");
1194 }
1195
1196 $this->form->setValuesByPost();
1197 $this->showGeneralSettings(true);
1198 }
initGeneralSettingsForm()
Init general settings form.
workWithUserSetting($setting)
Returns TRUE if working with the given user setting is allowed, FALSE otherwise.
showGeneralSettings($a_no_init=false)
General settings form.
static setPersonalStartingPoint($a_value, $a_ref_id=null)
Set personal starting point setting.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12

References $_POST, $ilCtrl, $ilSetting, $ilUser, $lng, $tpl, ilCalendarUserSettings\_getInstanceByUserId(), ilCharSelectorConfig\CONTEXT_USER, ilBuddySystem\getInstance(), ilUserUtil\hasPersonalStartingPoint(), initGeneralSettingsForm(), ilUtil\sendSuccess(), ilUserUtil\setPersonalStartingPoint(), showGeneralSettings(), and workWithUserSetting().

+ Here is the call graph for this function:

◆ savePassword()

ilPersonalSettingsGUI::savePassword ( )

Save password form.

Definition at line 611 of file class.ilPersonalSettingsGUI.php.

612 {
614
615 // normally we should not end up here
616 if (!$this->allowPasswordChange())
617 {
618 $ilCtrl->redirect($this, "showPersonalData");
619 return;
620 }
621
622 $this->initPasswordForm();
623 if ($this->form->checkInput())
624 {
625 $cp = $this->form->getItemByPostVar("current_password");
626 $np = $this->form->getItemByPostVar("new_password");
627 $error = false;
628
629 // The old password needs to be checked for verification
630 // unless the user uses Shibboleth authentication with additional
631 // local authentication for WebDAV.
632 #if ($ilUser->getAuthMode(true) != AUTH_SHIBBOLETH || ! $ilSetting->get("shib_auth_allow_local"))
633 if($ilUser->getAuthMode(true) == AUTH_LOCAL)
634 {
635 require_once 'Services/User/classes/class.ilUserPasswordManager.php';
636 if(!ilUserPasswordManager::getInstance()->verifyPassword($ilUser, ilUtil::stripSlashes($_POST['current_password'])))
637 {
638 $error = true;
639 $cp->setAlert($this->lng->txt('passwd_wrong'));
640 }
641 }
642
643 // select password from auto generated passwords
644 if ($this->ilias->getSetting("passwd_auto_generate") == 1 &&
645 (!ilUtil::isPassword($_POST["new_password"])))
646 {
647 $error = true;
648 $np->setAlert($this->lng->txt("passwd_not_selected"));
649 }
650
651
652 if ($this->ilias->getSetting("passwd_auto_generate") != 1 &&
653 !ilUtil::isPassword($_POST["new_password"],$custom_error))
654 {
655 $error = true;
656 if ($custom_error != '')
657 {
658 $np->setAlert($custom_error);
659 }
660 else
661 {
662 $np->setAlert($this->lng->txt("passwd_invalid"));
663 }
664 }
665 $error_lng_var = '';
666 if(
667 $this->ilias->getSetting("passwd_auto_generate") != 1 &&
668 !ilUtil::isPasswordValidForUserContext($_POST["new_password"], $ilUser, $error_lng_var)
669 )
670 {
671 ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
672 $np->setAlert($this->lng->txt($error_lng_var));
673 $error = true;
674 }
675 if ($this->ilias->getSetting("passwd_auto_generate") != 1 &&
676 ($ilUser->isPasswordExpired() || $ilUser->isPasswordChangeDemanded()) &&
677 ($_POST["current_password"] == $_POST["new_password"]))
678 {
679 $error = true;
680 $np->setAlert($this->lng->txt("new_pass_equals_old_pass"));
681 }
682
683 if (!$error)
684 {
685 $ilUser->resetPassword($_POST["new_password"], $_POST["new_password"]);
686 if ($_POST["current_password"] != $_POST["new_password"])
687 {
688 $ilUser->setLastPasswordChangeToNow();
689 }
690
691 if(ilSession::get('orig_request_target'))
692 {
693 ilUtil::sendSuccess($this->lng->txt('saved_successfully'), true);
694 $target = ilSession::get('orig_request_target');
695 ilSession::set('orig_request_target', '');
696 ilUtil::redirect($target);
697 }
698 else
699 {
700 ilUtil::sendSuccess($this->lng->txt('saved_successfully'));
701 $this->showPassword(true, true);
702 return;
703 }
704 }
705 }
706 $this->form->setValuesByPost();
707 $this->showPassword(true);
708 }
initPasswordForm()
Init password form.
showPassword($a_no_init=false, $hide_form=false)
static set($a_var, $a_val)
Set a value.
static getInstance()
Single method to reduce footprint (included files, created instances)
static isPassword($a_passwd, &$customError=null)
validates a password @access public
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static isPasswordValidForUserContext($clear_text_password, $user, &$error_language_variable=null)

References $_POST, $ilCtrl, $ilSetting, $ilUser, $lng, $tpl, allowPasswordChange(), AUTH_LOCAL, ilSession\get(), ilUserPasswordManager\getInstance(), initPasswordForm(), ilUtil\isPassword(), ilUtil\isPasswordValidForUserContext(), ilUtil\redirect(), ilUtil\sendFailure(), ilUtil\sendSuccess(), ilSession\set(), showPassword(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ setHeader()

ilPersonalSettingsGUI::setHeader ( )

Set header.

Definition at line 420 of file class.ilPersonalSettingsGUI.php.

421 {
422 $this->tpl->setVariable('HEADER', $this->lng->txt('personal_settings'));
423 }

Referenced by deleteOwnAccount1(), deleteOwnAccount2(), deleteOwnAccount3(), showGeneralSettings(), and showPassword().

+ Here is the caller graph for this function:

◆ setMailOptionsValuesByDB()

ilPersonalSettingsGUI::setMailOptionsValuesByDB ( )
private

Fetches data from model and loads this data into form.

Definition at line 189 of file class.ilPersonalSettingsGUI.php.

190 {
191 global $ilUser, $ilSetting;
192
193 require_once 'Services/Mail/classes/class.ilMailOptions.php';
194 $mailOptions = new ilMailOptions($ilUser->getId());
195
196 $data = array(
197 'linebreak' => $mailOptions->getLinebreak(),
198 'signature' => $mailOptions->getSignature(),
199 'cronjob_notification' => $mailOptions->getCronjobNotification()
200 );
201
202 if($ilSetting->get('usr_settings_hide_mail_incoming_mail') != '1')
203 {
204 $data['incoming_type'] = $mailOptions->getIncomingType();
205 }
206
207 $this->form->setValuesByArray($data);
208 }
Class UserMail this class handles user mails.
$data

References $data, $ilSetting, and $ilUser.

◆ showGeneralSettings()

ilPersonalSettingsGUI::showGeneralSettings (   $a_no_init = false)

General settings form.

Definition at line 766 of file class.ilPersonalSettingsGUI.php.

767 {
768 global $ilTabs, $ilToolbar, $ilCtrl;
769
770 // test to other base class
771// $ilToolbar->addButton("test",
772// $ilCtrl->getLinkTargetByClass(array("ilmailgui","ilmailformgui"), "mailUser"));
773
774 $this->__initSubTabs("showPersonalData");
775 $ilTabs->activateTab("general_settings");
776
777 $this->setHeader();
778
779 if (!$a_no_init)
780 {
782 }
783 $this->tpl->setContent($this->form->getHTML());
784 $this->tpl->show();
785 }

References $ilCtrl, initGeneralSettingsForm(), and setHeader().

Referenced by saveGeneralSettings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPassword()

ilPersonalSettingsGUI::showPassword (   $a_no_init = false,
  $hide_form = false 
)
Parameters
bool$a_no_init
bool$hide_form

Definition at line 477 of file class.ilPersonalSettingsGUI.php.

478 {
479 global $ilTabs, $ilUser;
480
481 $this->__initSubTabs("showPersonalData");
482 $ilTabs->activateTab("password");
483
484 $this->setHeader();
485 // check whether password of user have to be changed
486 // due to first login or password of user is expired
487 if($ilUser->isPasswordChangeDemanded())
488 {
490 $this->lng->txt('password_change_on_first_login_demand')
491 );
492 }
493 else if($ilUser->isPasswordExpired())
494 {
495 $msg = $this->lng->txt('password_expired');
496 $password_age = $ilUser->getPasswordAge();
497 ilUtil::sendInfo(sprintf($msg, $password_age));
498 }
499
500 if (!$a_no_init && !$hide_form)
501 {
502 $this->initPasswordForm();
503 }
504 $this->tpl->setContent(!$hide_form ? $this->form->getHTML() : '');
505 $this->tpl->show();
506 }

References $ilUser, initPasswordForm(), ilUtil\sendInfo(), and setHeader().

Referenced by savePassword().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ userSettingEnabled()

ilPersonalSettingsGUI::userSettingEnabled (   $setting)

Returns TRUE if user setting is enabled, FALSE otherwise.

Definition at line 753 of file class.ilPersonalSettingsGUI.php.

754 {
755 $result = TRUE;
756 if ($this->settings["usr_settings_disable_".$setting] == 1)
757 {
758 $result = FALSE;
759 }
760 return $result;
761 }
$result

References $result.

◆ userSettingVisible()

ilPersonalSettingsGUI::userSettingVisible (   $setting)

Returns TRUE if user setting is visible, FALSE otherwise.

Definition at line 738 of file class.ilPersonalSettingsGUI.php.

739 {
740 $result = TRUE;
741 if (isset($this->settings["usr_settings_hide_".$setting]) &&
742 $this->settings["usr_settings_hide_".$setting] == 1)
743 {
744 $result = FALSE;
745 }
746 return $result;
747 }

References $result.

Referenced by initGeneralSettingsForm().

+ Here is the caller graph for this function:

◆ workWithUserSetting()

ilPersonalSettingsGUI::workWithUserSetting (   $setting)

Returns TRUE if working with the given user setting is allowed, FALSE otherwise.

Definition at line 720 of file class.ilPersonalSettingsGUI.php.

721 {
722 $result = TRUE;
723 if ($this->settings["usr_settings_hide_".$setting] == 1)
724 {
725 $result = FALSE;
726 }
727 if ($this->settings["usr_settings_disable_".$setting] == 1)
728 {
729 $result = FALSE;
730 }
731 return $result;
732 }

References $result.

Referenced by saveGeneralSettings().

+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilPersonalSettingsGUI::$ctrl

Definition at line 16 of file class.ilPersonalSettingsGUI.php.

◆ $ilias

ilPersonalSettingsGUI::$ilias

Definition at line 15 of file class.ilPersonalSettingsGUI.php.

Referenced by __construct().

◆ $lng

◆ $tpl

ilPersonalSettingsGUI::$tpl

The documentation for this class was generated from the following file: