ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
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...
 
 allowPasswordChange ()
 Check, whether password change is allowed for user. 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

 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$ 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.

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

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) ...
+ Here is the call graph for this function:

Member Function Documentation

◆ abortDeleteOwnAccount()

ilPersonalSettingsGUI::abortDeleteOwnAccount ( )
protected

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

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

1236  {
1237  global $ilCtrl, $ilUser;
1238 
1239  $ilUser->removeDeletionFlag();
1240 
1241  ilUtil::sendInfo($this->lng->txt("user_delete_own_account_aborted"), true);
1242  $ilCtrl->redirect($this, "showGeneralSettings");
1243  }
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ allowPasswordChange()

ilPersonalSettingsGUI::allowPasswordChange ( )

Check, whether password change is allowed for user.

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

References $ilSetting, $ilUser, AUTH_CAS, AUTH_LOCAL, AUTH_OPENID, AUTH_SHIBBOLETH, AUTH_SOAP, ilAuthUtils\isPasswordModificationEnabled(), and userSettingVisible().

Referenced by initPasswordForm(), savePassword(), and setMailOptionsValuesByDB().

592  {
593  global $ilUser, $ilSetting;
594 
595 
596  return ilAuthUtils::isPasswordModificationEnabled($ilUser->getAuthMode(true));
597 
598  // Moved to ilAuthUtils
599 
600  // do nothing if auth mode is not local database
601  if ($ilUser->getAuthMode(true) != AUTH_LOCAL &&
602  ($ilUser->getAuthMode(true) != AUTH_CAS || !$ilSetting->get("cas_allow_local")) &&
603  ($ilUser->getAuthMode(true) != AUTH_SHIBBOLETH || !$ilSetting->get("shib_auth_allow_local")) &&
604  ($ilUser->getAuthMode(true) != AUTH_SOAP || !$ilSetting->get("soap_auth_allow_local")) &&
605  ($ilUser->getAuthMode(true) != AUTH_OPENID)
606  )
607  {
608  return false;
609  }
610  if (!$this->userSettingVisible('password') ||
611  $this->ilias->getSetting('usr_settings_disable_password'))
612  {
613  return false;
614  }
615  return true;
616  }
const AUTH_OPENID
const AUTH_CAS
const AUTH_SHIBBOLETH
userSettingVisible($setting)
Returns TRUE if user setting is visible, FALSE otherwise.
redirection script todo: (a better solution should control the processing via a xml file) ...
const AUTH_LOCAL
const AUTH_SOAP
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
static isPasswordModificationEnabled($a_authmode)
Check if password modification is enabled.
+ 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 1184 of file class.ilPersonalSettingsGUI.php.

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

1185  {
1186  global $ilTabs, $ilToolbar, $ilUser, $ilSetting;
1187 
1188  if(!(bool)$ilSetting->get('user_delete_own_account') ||
1189  $ilUser->getId() == SYSTEM_USER_ID)
1190  {
1191  $this->ctrl->redirect($this, "showGeneralSettings");
1192  }
1193 
1194  // too make sure
1195  $ilUser->removeDeletionFlag();
1196 
1197  $this->setHeader();
1198  $this->__initSubTabs("deleteOwnAccount");
1199  $ilTabs->activateTab("delacc");
1200 
1201  ilUtil::sendInfo($this->lng->txt('user_delete_own_account_info'));
1202  $ilToolbar->addButton($this->lng->txt('btn_next'),
1203  $this->ctrl->getLinkTarget($this, 'deleteOwnAccount2'));
1204 
1205  $this->tpl->show();
1206  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ deleteOwnAccount2()

ilPersonalSettingsGUI::deleteOwnAccount2 ( )
protected

Delete own account dialog - login redirect.

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

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

1212  {
1213  global $ilTabs, $ilUser, $ilSetting;
1214 
1215  if(!(bool)$ilSetting->get('user_delete_own_account') ||
1216  $ilUser->getId() == SYSTEM_USER_ID)
1217  {
1218  $this->ctrl->redirect($this, "showGeneralSettings");
1219  }
1220 
1221  $this->setHeader();
1222  $this->__initSubTabs("deleteOwnAccount");
1223  $ilTabs->activateTab("delacc");
1224 
1225  include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
1226  $cgui = new ilConfirmationGUI();
1227  $cgui->setHeaderText($this->lng->txt('user_delete_own_account_logout_confirmation'));
1228  $cgui->setFormAction($this->ctrl->getFormAction($this));
1229  $cgui->setCancel($this->lng->txt("cancel"), "abortDeleteOwnAccount");
1230  $cgui->setConfirm($this->lng->txt("user_delete_own_account_logout_button"), "deleteOwnAccountLogout");
1231  $this->tpl->setContent($cgui->getHTML());
1232  $this->tpl->show();
1233  }
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
Confirmation screen class.
+ Here is the call graph for this function:

◆ deleteOwnAccount3()

ilPersonalSettingsGUI::deleteOwnAccount3 ( )
protected

Delete own account dialog - final confirmation.

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

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

1265  {
1266  global $ilTabs, $ilUser, $ilSetting;
1267 
1268  if(!(bool)$ilSetting->get('user_delete_own_account') ||
1269  $ilUser->getId() == SYSTEM_USER_ID ||
1270  !$ilUser->hasDeletionFlag())
1271  {
1272  $this->ctrl->redirect($this, "showGeneralSettings");
1273  }
1274 
1275  $this->setHeader();
1276  $this->__initSubTabs("deleteOwnAccount");
1277  $ilTabs->activateTab("delacc");
1278 
1279  include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
1280  $cgui = new ilConfirmationGUI();
1281  $cgui->setHeaderText($this->lng->txt('user_delete_own_account_final_confirmation'));
1282  $cgui->setFormAction($this->ctrl->getFormAction($this));
1283  $cgui->setCancel($this->lng->txt("cancel"), "abortDeleteOwnAccount");
1284  $cgui->setConfirm($this->lng->txt("confirm"), "deleteOwnAccount4");
1285  $this->tpl->setContent($cgui->getHTML());
1286  $this->tpl->show();
1287  }
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
Confirmation screen class.
+ Here is the call graph for this function:

◆ deleteOwnAccount4()

ilPersonalSettingsGUI::deleteOwnAccount4 ( )
protected

Delete own account dialog - action incl.

notification email

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

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

1293  {
1294  global $ilUser, $ilAuth, $ilSetting, $ilLog;
1295 
1296  if(!(bool)$ilSetting->get('user_delete_own_account') ||
1297  $ilUser->getId() == SYSTEM_USER_ID ||
1298  !$ilUser->hasDeletionFlag())
1299  {
1300  $this->ctrl->redirect($this, "showGeneralSettings");
1301  }
1302 
1303  // build notification
1304 
1305  include_once "./Services/Notification/classes/class.ilSystemNotification.php";
1306  $ntf = new ilSystemNotification();
1307  $ntf->setLangModules(array("user"));
1308  $ntf->addAdditionalInfo("profile", $ilUser->getProfileAsString($this->lng), true);
1309 
1310  // mail message
1312  $ntf->setIntroductionDirect(
1313  sprintf($this->lng->txt("user_delete_own_account_email_body"),
1314  $ilUser->getLogin(),
1315  ILIAS_HTTP_PATH,
1317 
1318  $message = $ntf->composeAndGetMessage($ilUser->getId(), null, null, true);
1319  $subject = $this->lng->txt("user_delete_own_account_email_subject");
1320 
1321 
1322  // send notification
1323 
1324  include_once "Services/Mail/classes/class.ilMail.php";
1325  $mail = new ilMail(ANONYMOUS_USER_ID);
1326 
1327  $user_email = $ilUser->getEmail();
1328  $admin_mail = $ilSetting->get("user_delete_own_account_email");
1329 
1330  // to user, admin as bcc
1331  if($user_email)
1332  {
1333  $mail->sendMimeMail($user_email, null, $admin_mail, $subject, $message, null, true);
1334  }
1335  // admin only
1336  else if($admin_mail)
1337  {
1338  $mail->sendMimeMail($admin_mail, null, null, $subject, $message, null, true);
1339  }
1340 
1341  $ilLog->write("Account deleted: ".$ilUser->getLogin()." (".$ilUser->getId().")");
1342 
1343  $ilUser->delete();
1344 
1345  // terminate session
1346  $ilAuth->logout();
1347  session_destroy();
1348 
1349  ilUtil::redirect("login.php?accdel=1");
1350  }
static setUseRelativeDates($a_status)
set use relative dates
const IL_CAL_UNIX
Class Mail this class handles base functions for mail handling.
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
static redirect($a_script)
http redirect to other script
Wrapper classes for system notifications.
+ Here is the call graph for this function:

◆ deleteOwnAccountLogout()

ilPersonalSettingsGUI::deleteOwnAccountLogout ( )
protected

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

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

1246  {
1247  global $ilAuth, $ilUser;
1248 
1249  // we are setting the flag and ending the session in the same step
1250 
1251  $ilUser->activateDeletionFlag();
1252 
1253  // see ilStartupGUI::showLogout()
1255  $ilAuth->logout();
1256  session_destroy();
1257 
1258  ilUtil::redirect("login.php?target=usr_".md5("usrdelown"));
1259  }
const SESSION_CLOSE_USER
static setClosingContext($a_context)
set closing context (for statistics)
global $ilUser
Definition: imgupload.php:15
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ executeCommand()

& ilPersonalSettingsGUI::executeCommand ( )

execute command

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

References $_POST, $cmd, $ilCtrl, $ilSetting, $ilUser, $lng, $tpl, ilMailGlobalServices\getMailObjectRefId(), initMailOptionsForm(), ilUtil\sendSuccess(), setHeader(), and ilUtil\stripSlashes().

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
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ initGeneralSettingsForm()

ilPersonalSettingsGUI::initGeneralSettingsForm ( )

Init general settings form.

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

References $ilSetting, $ilUser, $lng, $options, $si, ilCalendarUserSettings\_getInstanceByUserId(), ilCalendarUtil\_getShortTimeZoneList(), ilObjStyleSettings\_lookupActivatedStyle(), ilLanguage\_lookupEntry(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilFormat\_secondsToString(), ilCharSelectorConfig\CONTEXT_USER, ilCalendarSettings\DATE_FORMAT_DMY, ilCalendarSettings\DATE_FORMAT_MDY, ilCalendarSettings\DATE_FORMAT_YMD, ilUserUtil\getPersonalStartingObject(), ilUserUtil\getPersonalStartingPoint(), ilUserUtil\getPossibleStartingPoints(), ilSession\getSessionExpireValue(), ilUserUtil\hasPersonalStartingPoint(), ilUserUtil\hasPersonalStartPointPref(), ilSessionReminder\MIN_LEAD_TIME, ilCheckboxInputGUI\setChecked(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilSelectInputGUI\setOptions(), ilRadioOption\setValue(), ilUserUtil\START_REPOSITORY_OBJ, ilSessionReminder\SUGGESTED_LEAD_TIME, ilCalendarSettings\TIME_FORMAT_12, ilCalendarSettings\TIME_FORMAT_24, and userSettingVisible().

Referenced by saveGeneralSettings(), and showGeneralSettings().

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

References $ilCtrl, $ilSetting, $ilUser, $lng, $options, $si, ilObjUser\_lookupEmail(), IL_MAIL_BOTH, IL_MAIL_EMAIL, IL_MAIL_LOCAL, ilFormPropertyGUI\setInfo(), ilSelectInputGUI\setOptions(), and ilTextAreaInputGUI\setRows().

Referenced by executeCommand(), and setMailOptionsValuesByDB().

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_EMAIL
This class represents a selection list property in a property form.
This class represents a property form user interface.
This class represents a checkbox property in a property form.
const IL_MAIL_LOCAL
global $ilCtrl
Definition: ilias.php:18
setInfo($a_info)
Set Information Text.
if(!is_array($argv)) $options
_lookupEmail($a_user_id)
Lookup email.
setOptions($a_options)
Set Options.
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initPasswordForm()

ilPersonalSettingsGUI::initPasswordForm ( )

Init password form.

Parameters
int$a_modeEdit Mode

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

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

Referenced by savePassword(), and showPassword().

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  }
This class represents a property form user interface.
const AUTH_CAS
const AUTH_SHIBBOLETH
static _isActive()
Static getter.
setRetype($a_val)
Set retype on/off.
static getPasswordRequirementsInfo()
infotext for ilPasswordInputGUI setInfo()
This class represents a password property in a property form.
const AUTH_LOCAL
allowPasswordChange()
Check, whether password change is allowed for user.
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
setRequired($a_required)
Set Required.
+ 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 1061 of file class.ilPersonalSettingsGUI.php.

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

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

◆ savePassword()

ilPersonalSettingsGUI::savePassword ( )

Save password form.

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

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().

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

◆ setHeader()

ilPersonalSettingsGUI::setHeader ( )

Set header.

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

References $ilCtrl, and $ilUser.

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

421  {
422  $this->tpl->setVariable('HEADER', $this->lng->txt('personal_settings'));
423  }
+ 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.

References $data, $ilCtrl, $ilSetting, $ilUser, $lng, allowPasswordChange(), ilMailOptions\getIncomingType(), ilMailGlobalServices\getMailObjectRefId(), initMailOptionsForm(), ilUtil\sendSuccess(), and setHeader().

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.
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ showGeneralSettings()

ilPersonalSettingsGUI::showGeneralSettings (   $a_no_init = false)

General settings form.

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

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

Referenced by saveGeneralSettings().

778  {
779  global $ilTabs, $ilToolbar, $ilCtrl;
780 
781  // test to other base class
782 // $ilToolbar->addButton("test",
783 // $ilCtrl->getLinkTargetByClass(array("ilmailgui","ilmailformgui"), "mailUser"));
784 
785  $this->__initSubTabs("showPersonalData");
786  $ilTabs->activateTab("general_settings");
787 
788  $this->setHeader();
789 
790  if (!$a_no_init)
791  {
792  $this->initGeneralSettingsForm();
793  }
794  $this->tpl->setContent($this->form->getHTML());
795  $this->tpl->show();
796  }
initGeneralSettingsForm()
Init general settings form.
global $ilCtrl
Definition: ilias.php:18
+ 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.

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

Referenced by savePassword().

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  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
initPasswordForm()
Init password form.
global $ilUser
Definition: imgupload.php:15
+ 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 764 of file class.ilPersonalSettingsGUI.php.

References $result.

765  {
766  $result = TRUE;
767  if ($this->settings["usr_settings_disable_".$setting] == 1)
768  {
769  $result = FALSE;
770  }
771  return $result;
772  }
$result

◆ userSettingVisible()

ilPersonalSettingsGUI::userSettingVisible (   $setting)

Returns TRUE if user setting is visible, FALSE otherwise.

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

References $result.

Referenced by allowPasswordChange(), and initGeneralSettingsForm().

750  {
751  $result = TRUE;
752  if (isset($this->settings["usr_settings_hide_".$setting]) &&
753  $this->settings["usr_settings_hide_".$setting] == 1)
754  {
755  $result = FALSE;
756  }
757  return $result;
758  }
$result
+ 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 731 of file class.ilPersonalSettingsGUI.php.

References $result.

Referenced by saveGeneralSettings().

732  {
733  $result = TRUE;
734  if ($this->settings["usr_settings_hide_".$setting] == 1)
735  {
736  $result = FALSE;
737  }
738  if ($this->settings["usr_settings_disable_".$setting] == 1)
739  {
740  $result = FALSE;
741  }
742  return $result;
743  }
$result
+ 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: