25 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
32 $this->settings = $ilias->getAllSettings();
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");
49 $next_class = $this->ctrl->getNextClass();
55 $cmd = $this->ctrl->getCmd(
"showGeneralSettings");
66 public function saveMailOptions()
77 include_once
'Services/Mail/classes/class.ilMailGlobalServices.php';
80 $this->
ilias->raiseError($lng->txt(
'permission_denied'), $this->
ilias->error_obj->MESSAGE);
83 $lng->loadLanguageModule(
'mail');
85 $this->__initSubTabs(
'showMailOptions');
86 $ilTabs->activateTab(
'mail_settings');
90 require_once
'Services/Mail/classes/class.ilMailOptions.php';
92 if($ilSetting->get(
'usr_settings_hide_mail_incoming_mail') !=
'1' &&
93 $ilSetting->get(
'usr_settings_disable_mail_incoming_mail') !=
'1')
95 $incoming_type = (int)
$_POST[
'incoming_type'];
99 $incoming_type = $mailOptions->getIncomingType();
103 if($this->form->checkInput())
105 $mailOptions->updateOptions(
109 (
int)$_POST[
'cronjob_notification']
115 if(!isset(
$_POST[
'incoming_type']))
117 $_POST[
'incoming_type'] = $mailOptions->getIncomingType();
120 $this->form->setValuesByPost();
122 $this->tpl->setContent($this->form->getHTML());
133 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
136 $this->form->setFormAction($ilCtrl->getFormAction($this,
'saveMailOptions'));
137 $this->form->setTitle($lng->txt(
'mail_settings'));
140 include_once
'Services/Mail/classes/class.ilMailOptions.php';
141 if($ilSetting->get(
'usr_settings_hide_mail_incoming_mail') !=
'1')
151 $ilSetting->get(
'usr_settings_disable_mail_incoming_mail') ==
'1')
153 $si->setDisabled(
true);
155 $this->form->addItem($si);
160 for($i = 50; $i <= 80; $i++)
166 $this->form->addItem(
$si);
172 $this->form->addItem($ta);
175 if($ilSetting->get(
'mail_notification'))
177 $cb =
new ilCheckboxInputGUI($lng->txt(
'cron_mail_notification'),
'cronjob_notification');
178 $cb->
setInfo($lng->txt(
'mail_cronjob_notification_info'));
180 $this->form->addItem($cb);
183 $this->form->addCommandButton(
'saveMailOptions', $lng->txt(
'save'));
193 require_once
'Services/Mail/classes/class.ilMailOptions.php';
197 'linebreak' => $mailOptions->getLinebreak(),
198 'signature' => $mailOptions->getSignature(),
199 'cronjob_notification' => $mailOptions->getCronjobNotification()
202 if($ilSetting->get(
'usr_settings_hide_mail_incoming_mail') !=
'1')
207 $this->form->setValuesByArray($data);
213 public function showMailOptions()
220 global $ilTabs,
$lng, $rbacsystem;
222 include_once
'Services/Mail/classes/class.ilMailGlobalServices.php';
225 $this->
ilias->raiseError($lng->txt(
'permission_denied'), $this->
ilias->error_obj->MESSAGE);
228 $lng->loadLanguageModule(
'mail');
230 $this->__initSubTabs(
'showMailOptions');
231 $ilTabs->activateTab(
'mail_settings');
238 $this->tpl->setContent($this->form->getHTML());
291 function __initSubTabs($a_cmd)
298 $ilHelp->setScreenIdComponent(
"user");
300 $showPassword = ($a_cmd ==
'showPassword') ?
true :
false;
301 $showGeneralSettings = ($a_cmd ==
'showGeneralSettings') ?
true :
false;
302 $showMailOptions = ($a_cmd ==
'showMailOptions') ?
true :
false;
304 $showChatOptions = ($a_cmd ==
'showChatOptions') ?
true :
false;
309 $ilTabs->addTarget(
"general_settings", $this->ctrl->getLinkTarget($this,
"showGeneralSettings"),
310 "",
"",
"", $showGeneralSettings);
315 $ilTabs->addTarget(
"password", $this->ctrl->getLinkTarget($this,
"showPassword"),
316 "",
"",
"", $showPassword);
319 include_once
'Services/Mail/classes/class.ilMailGlobalServices.php';
322 $ilTabs->addTarget(
"mail_settings", $this->ctrl->getLinkTarget($this,
"showMailOptions"),
"",
"",
"", $showMailOptions);
325 $chatSettings =
new ilSetting(
'chatroom');
326 $notificationSettings =
new ilSetting(
'notifications');
328 $chatSettings->get(
'chat_enabled',
false) &&
329 $notificationSettings->get(
'enable_osd',
false) &&
330 $chatSettings->get(
'play_invitation_sound',
false)
333 $ilTabs->addTarget(
'chat_settings', $this->ctrl->getLinkTarget($this,
'showChatOptions'),
'',
'',
'', $showChatOptions);
336 include_once
"./Services/Administration/classes/class.ilSetting.php";
344 if((
bool)$ilSetting->get(
'user_delete_own_account') &&
345 $ilUser->getId() != SYSTEM_USER_ID)
347 $ilTabs->addTab(
"delacc", $this->lng->txt(
'user_delete_own_account'),
348 $this->ctrl->getLinkTarget($this,
"deleteOwnAccount1"));
355 private function getChatSettingsForm()
363 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
366 $form->setFormAction($this->ctrl->getFormAction($this,
'saveChatOptions'));
367 $form->setTitle($lng->txt(
"chat_settings"));
370 $chb->setOptionTitle($this->lng->txt(
'play_invitation_sound'));
371 $form->addItem($chb);
373 $form->addCommandButton(
"saveChatOptions", $lng->txt(
"save"));
381 public function saveChatOptions()
391 $chatSettings =
new ilSetting(
'chatroom');
392 $notificationSettings =
new ilSetting(
'notifications');
394 $chatSettings->get(
'chat_enabled',
false) &&
395 $notificationSettings->get(
'enable_osd',
false) &&
396 $chatSettings->get(
'play_invitation_sound',
false)
400 $ilCtrl->redirect($this);
403 $form = $this->getChatSettingsForm();
404 if(!$form->checkInput())
406 $this->showChatOptions($form);
410 $ilUser->setPref(
'chat_play_invitation_sound', (
int)$form->getInput(
'play_invitation_sound'));
411 $ilUser->writePrefs();
414 $this->showChatOptions($form);
422 $this->tpl->setVariable(
'HEADER', $this->lng->txt(
'personal_settings'));
436 $chatSettings =
new ilSetting(
'chatroom');
437 $notificationSettings =
new ilSetting(
'notifications');
439 $chatSettings->get(
'chat_enabled',
false) &&
440 $notificationSettings->get(
'enable_osd',
false) &&
441 $chatSettings->get(
'play_invitation_sound',
false)
444 $ilCtrl->redirect($this);
447 $this->__initSubTabs(
'showChatOptions');
452 $form->setValuesByPost();
456 $form = $this->getChatSettingsForm();
457 $form->setValuesByArray(array(
458 'play_invitation_sound' => $ilUser->getPref(
'chat_play_invitation_sound')
462 $this->tpl->setContent($form->getHTML());
481 $this->__initSubTabs(
"showPersonalData");
482 $ilTabs->activateTab(
"password");
487 if($ilUser->isPasswordChangeDemanded())
490 $this->lng->txt(
'password_change_on_first_login_demand')
493 else if($ilUser->isPasswordExpired())
495 $msg = $this->lng->txt(
'password_expired');
496 $password_age = $ilUser->getPasswordAge();
500 if (!$a_no_init && !$hide_form)
504 $this->tpl->setContent(!$hide_form ? $this->form->getHTML() :
'');
517 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
534 $cpass->setSkipSyntaxCheck(
true);
536 if($ilUser->getPasswd())
538 $cpass->setRequired(
true);
540 $this->form->addItem($cpass);
548 if ($ilSetting->get(
"passwd_auto_generate") == 1)
550 $ipass->setPreSelection(
true);
552 $this->form->addItem($ipass);
553 $this->form->addCommandButton(
"savePassword", $lng->txt(
"save"));
554 $this->form->addCommandButton(
"showPassword", $lng->txt(
"new_list_password"));
558 $this->form->addItem($ipass);
559 $this->form->addCommandButton(
"savePassword", $lng->txt(
"save"));
562 switch ($ilUser->getAuthMode(
true))
565 $this->form->setTitle($lng->txt(
"chg_password"));
570 require_once
'Services/WebDAV/classes/class.ilDAVServer.php';
573 $this->form->setTitle($lng->txt(
"chg_ilias_and_webfolder_password"));
577 $this->form->setTitle($lng->txt(
"chg_ilias_password"));
581 $this->form->setTitle($lng->txt(
"chg_ilias_password"));
584 $this->form->setFormAction($this->ctrl->getFormAction($this));
604 return \ilAuthUtils::isPasswordModificationHidden() && ($ilUser->isPasswordChangeDemanded() || $ilUser->isPasswordExpired());
618 $ilCtrl->redirect($this,
"showPersonalData");
623 if ($this->form->checkInput())
625 $cp = $this->form->getItemByPostVar(
"current_password");
626 $np = $this->form->getItemByPostVar(
"new_password");
632 #if ($ilUser->getAuthMode(true) != AUTH_SHIBBOLETH || ! $ilSetting->get("shib_auth_allow_local")) 635 require_once
'Services/User/classes/class.ilUserPasswordManager.php';
639 $cp->setAlert($this->lng->txt(
'passwd_wrong'));
644 if ($this->
ilias->getSetting(
"passwd_auto_generate") == 1 &&
648 $np->setAlert($this->lng->txt(
"passwd_not_selected"));
652 if ($this->
ilias->getSetting(
"passwd_auto_generate") != 1 &&
656 if ($custom_error !=
'')
658 $np->setAlert($custom_error);
662 $np->setAlert($this->lng->txt(
"passwd_invalid"));
667 $this->
ilias->getSetting(
"passwd_auto_generate") != 1 &&
672 $np->setAlert($this->lng->txt($error_lng_var));
675 if ($this->
ilias->getSetting(
"passwd_auto_generate") != 1 &&
676 ($ilUser->isPasswordExpired() || $ilUser->isPasswordChangeDemanded()) &&
680 $np->setAlert($this->lng->txt(
"new_pass_equals_old_pass"));
685 $ilUser->resetPassword(
$_POST[
"new_password"],
$_POST[
"new_password"]);
686 if (
$_POST[
"current_password"] !=
$_POST[
"new_password"])
688 $ilUser->setLastPasswordChangeToNow();
706 $this->form->setValuesByPost();
723 if ($this->settings[
"usr_settings_hide_".$setting] == 1)
727 if ($this->settings[
"usr_settings_disable_".$setting] == 1)
741 if (isset($this->settings[
"usr_settings_hide_".$setting]) &&
742 $this->settings[
"usr_settings_hide_".$setting] == 1)
756 if ($this->settings[
"usr_settings_disable_".$setting] == 1)
768 global $ilTabs, $ilToolbar,
$ilCtrl;
774 $this->__initSubTabs(
"showPersonalData");
775 $ilTabs->activateTab(
"general_settings");
783 $this->tpl->setContent($this->form->getHTML());
796 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
802 $languages = $this->lng->getInstalledLanguages();
804 foreach($languages as $lang_key)
811 $si->setValue($ilUser->getLanguage());
812 $si->setDisabled($ilSetting->get(
"usr_settings_disable_language"));
813 $this->form->addItem(
$si);
817 include_once(
"./Services/Style/classes/class.ilObjStyleSettings.php");
820 $templates = $styleDefinition->getAllTemplates();
821 if (is_array($templates))
826 foreach($templates as $template)
830 $styleDef->startParsing();
831 $styles = $styleDef->getStyles();
833 foreach($styles as
$style)
840 $options[$template[
"id"].
":".$style[
"id"]] =
841 $styleDef->getTemplateName().
" / ".$style[
"name"];
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);
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);
866 $hits_options = array(10,15,20,30,40,50,100,9999);
869 foreach($hits_options as $hits_option)
871 $hstr = ($hits_option == 9999)
872 ? $this->lng->txt(
"no_limit")
877 $si->setValue($ilUser->prefs[
"hits_per_page"]);
878 $si->setDisabled($ilSetting->get(
"usr_settings_disable_hits_per_page"));
879 $this->form->addItem(
$si);
899 $lv =
new ilSelectInputGUI($this->lng->txt(
"user_store_last_visited"),
"store_last_visited");
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);
910 if ($awrn_set->get(
"awrn_enabled",
false) && $this->
userSettingVisible(
"hide_own_online_status"))
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);
920 require_once
'Services/Contact/BuddySystem/classes/class.ilBuddySystem.php';
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);
931 include_once
'Services/Authentication/classes/class.ilSessionReminder.php';
932 if(ilSessionReminder::isGloballyActivated())
934 $cb =
new ilCheckboxInputGUI($this->lng->txt(
'session_reminder'),
'session_reminder_enabled');
935 $cb->
setInfo($this->lng->txt(
'session_reminder_info'));
937 $cb->setChecked((
int)$ilUser->getPref(
'session_reminder_enabled'));
940 $lead_time_gui =
new ilNumberInputGUI($this->lng->txt(
'session_reminder_lead_time'),
'session_reminder_lead_time');
944 $max_value = max($min_value, ((
int)$expires / 60) - 1);
946 $current_user_value = $ilUser->getPref(
'session_reminder_lead_time');
947 if($current_user_value < $min_value ||
948 $current_user_value > $max_value)
954 $min_value, $current_user_value
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);
965 $this->form->addItem($cb);
971 include_once(
'Services/Calendar/classes/class.ilCalendarUserSettings.php');
972 include_once(
'Services/Calendar/classes/class.ilCalendarUtil.php');
973 $lng->loadLanguageModule(
"dateplaner");
978 $select->setInfo($lng->txt(
'cal_timezone_info'));
979 $select->setValue($user_settings->getTimeZone());
980 $this->form->addItem($select);
983 $select =
new ilSelectInputGUI($lng->txt(
'cal_user_date_format'),
'date_format');
988 $select->setInfo($lng->txt(
'cal_date_format_info'));
989 $select->setValue($user_settings->getDateFormat());
990 $this->form->addItem($select);
992 $select =
new ilSelectInputGUI($lng->txt(
'cal_user_time_format'),
'time_format');
996 $select->setInfo($lng->txt(
'cal_time_format_info'));
997 $select->setValue($user_settings->getTimeFormat());
998 $this->form->addItem($select);
1002 include_once
"Services/User/classes/class.ilUserUtil.php";
1005 $this->lng->loadLanguageModule(
"administration");
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);
1019 $this->form->addItem(
$si);
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);
1030 $repobj_id->
setValue($start_ref_id);
1036 $repobj_id->
setInfo($lng->txt(
"obj_".ilObject::_lookupType($start_obj_id)).
1041 $repobj->addSubItem($repobj_id);
1042 $si->addOption($repobj);
1047 if ($ilSetting->get(
'char_selector_availability') > 0)
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);
1057 $this->form->addCommandButton(
"saveGeneralSettings", $lng->txt(
"save"));
1058 $this->form->setTitle($lng->txt(
"general_settings"));
1059 $this->form->setFormAction($this->ctrl->getFormAction($this));
1071 if ($this->form->checkInput())
1076 if (
$_POST[
"skin_style"] !=
"")
1078 $sknst = explode(
":",
$_POST[
"skin_style"]);
1080 if ($ilUser->getPref(
"style") != $sknst[1] ||
1081 $ilUser->getPref(
"skin") != $sknst[0])
1083 $ilUser->setPref(
"skin", $sknst[0]);
1084 $ilUser->setPref(
"style", $sknst[1]);
1092 $ilUser->setLanguage(
$_POST[
"language"]);
1098 if (
$_POST[
"hits_per_page"] !=
"")
1100 $ilUser->setPref(
"hits_per_page",
$_POST[
"hits_per_page"]);
1112 global $ilNavigationHistory;
1113 $ilUser->setPref(
"store_last_visited", (
int)
$_POST[
"store_last_visited"]);
1114 if ((
int) $_POST[
"store_last_visited"] > 0)
1116 $ilNavigationHistory->deleteDBEntries();
1117 if ((
int) $_POST[
"store_last_visited"] == 2)
1119 $ilNavigationHistory->deleteSessionEntries();
1126 if ($_POST[
"hide_own_online_status"] == 1)
1128 $ilUser->setPref(
"hide_own_online_status",
"y");
1132 $ilUser->setPref(
"hide_own_online_status",
"n");
1136 require_once
'Services/Contact/BuddySystem/classes/class.ilBuddySystem.php';
1139 if(isset($_POST[
'bs_allow_to_contact_me']) && $_POST[
'bs_allow_to_contact_me'] == 1)
1141 $ilUser->setPref(
'bs_allow_to_contact_me',
'y');
1145 $ilUser->setPref(
'bs_allow_to_contact_me',
'n');
1152 $ilUser->setPref(
"screen_reader_optimization", $_POST[
"screen_reader_optimization"]);
1156 include_once
'Services/Authentication/classes/class.ilSessionReminder.php';
1157 if(ilSessionReminder::isGloballyActivated())
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'));
1164 include_once
"Services/User/classes/class.ilUserUtil.php";
1168 $this->form->getInput(
'usr_start_ref_id'));
1173 if ($ilSetting->get(
'char_selector_availability') > 0)
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());
1185 include_once(
'Services/Calendar/classes/class.ilCalendarUserSettings.php');
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();
1193 $ilCtrl->redirect($this,
"showGeneralSettings");
1196 $this->form->setValuesByPost();
1207 if(!(
bool)$ilSetting->get(
'user_delete_own_account') ||
1208 $ilUser->getId() == SYSTEM_USER_ID)
1210 $this->ctrl->redirect($this,
"showGeneralSettings");
1214 $ilUser->removeDeletionFlag();
1217 $this->__initSubTabs(
"deleteOwnAccount");
1218 $ilTabs->activateTab(
"delacc");
1221 $ilToolbar->addButton($this->lng->txt(
'btn_next'),
1222 $this->ctrl->getLinkTarget($this,
'deleteOwnAccount2'));
1234 if(!(
bool)$ilSetting->get(
'user_delete_own_account') ||
1235 $ilUser->getId() == SYSTEM_USER_ID)
1237 $this->ctrl->redirect($this,
"showGeneralSettings");
1241 $this->__initSubTabs(
"deleteOwnAccount");
1242 $ilTabs->activateTab(
"delacc");
1244 include_once
"Services/Utilities/classes/class.ilConfirmationGUI.php";
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());
1258 $ilUser->removeDeletionFlag();
1260 ilUtil::sendInfo($this->lng->txt(
"user_delete_own_account_aborted"),
true);
1261 $ilCtrl->redirect($this,
"showGeneralSettings");
1270 $ilUser->activateDeletionFlag();
1287 if(!(
bool)$ilSetting->get(
'user_delete_own_account') ||
1288 $ilUser->getId() == SYSTEM_USER_ID ||
1289 !$ilUser->hasDeletionFlag())
1291 $this->ctrl->redirect($this,
"showGeneralSettings");
1295 $this->__initSubTabs(
"deleteOwnAccount");
1296 $ilTabs->activateTab(
"delacc");
1298 include_once
"Services/Utilities/classes/class.ilConfirmationGUI.php";
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());
1315 if(!(
bool)$ilSetting->get(
'user_delete_own_account') ||
1316 $ilUser->getId() == SYSTEM_USER_ID ||
1317 !$ilUser->hasDeletionFlag())
1319 $this->ctrl->redirect($this,
"showGeneralSettings");
1324 include_once
"./Services/Notification/classes/class.ilSystemNotification.php";
1326 $ntf->setLangModules(array(
"user"));
1327 $ntf->addAdditionalInfo(
"profile", $ilUser->getProfileAsString($this->lng),
true);
1331 $ntf->setIntroductionDirect(
1332 sprintf($this->lng->txt(
"user_delete_own_account_email_body"),
1333 $ilUser->getLogin(),
1337 $message = $ntf->composeAndGetMessage($ilUser->getId(), null, null,
true);
1338 $subject = $this->lng->txt(
"user_delete_own_account_email_subject");
1343 include_once
"Services/Mail/classes/class.ilMail.php";
1344 $mail =
new ilMail(ANONYMOUS_USER_ID);
1346 $user_email = $ilUser->getEmail();
1347 $admin_mail = $ilSetting->get(
"user_delete_own_account_email");
1352 $mail->sendMimeMail($user_email, null, $admin_mail, $subject, $message, null,
true);
1355 else if($admin_mail)
1357 $mail->sendMimeMail($admin_mail, null, null, $subject, $message, null,
true);
1360 $ilLog->write(
"Account deleted: ".$ilUser->getLogin().
" (".$ilUser->getId().
")");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
deleteOwnAccount1()
Delete own account dialog - 1st confirmation.
This class represents an option in a radio group.
Class UserMail this class handles user mails.
& executeCommand()
execute command
static _getInstance()
Get instance.
static hasPersonalStartPointPref()
Did user set any personal starting point (yet)?
This shows a character selector.
_lookupActivatedStyle($a_skin, $a_style)
lookup if a style is activated
static isPasswordValidForUserContext($clear_text_password, $user, &$error_language_variable=null)
static _getInstanceByUserId($a_user_id)
get singleton instance
savePassword()
Save password form.
initGeneralSettingsForm()
Init general settings form.
static getPersonalStartingPoint()
Get current personal starting point.
static get($a_var)
Get a value.
setMailOptionsValuesByDB()
Fetches data from model and loads this data into form.
static set($a_var, $a_val)
Set a value.
static _isActive()
Static getter.
static setUseRelativeDates($a_status)
set use relative dates
static _lookupTitle($a_id)
lookup object title
static _lookupEntry($a_lang_key, $a_mod, $a_id)
showPassword($a_no_init=false, $hide_form=false)
static _getShortTimeZoneList()
get short timezone list
saveGeneralSettings()
Save general settings.
setInfo($a_info)
Set Info.
static isPassword($a_passwd, &$customError=null)
validates a password public
deleteOwnAccount3()
Delete own account dialog - final confirmation.
static getPasswordRequirementsInfo()
infotext for ilPasswordInputGUI setInfo()
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.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
deleteOwnAccount4()
Delete own account dialog - action incl.
workWithUserSetting($setting)
Returns TRUE if working with the given user setting is allowed, FALSE otherwise.
initPasswordForm()
Init password form.
setValue($a_value)
Set Value.
if(!is_array($argv)) $options
Class Mail this class handles base functions for mail handling.
static _lookupObjId($a_id)
This class represents a text property in a property form.
static formatDate(ilDateTime $date)
Format a date public.
redirection script todo: (a better solution should control the processing via a xml file) ...
_lookupEmail($a_user_id)
Lookup email.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
showGeneralSettings($a_no_init=false)
General settings form.
initMailOptionsForm()
Initialises the mail options form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
const SUGGESTED_LEAD_TIME
GUI class for personal profile.
allowPasswordChange()
Check, whether password change is allowed for user.
static setClosingContext($a_context)
set closing context (for statistics)
setRows($a_rows)
Set Rows.
userSettingEnabled($setting)
Returns TRUE if user setting is enabled, FALSE otherwise.
This class represents a text area property in a property form.
static getMailObjectRefId()
Determines the reference id of the mail object and stores this information in a local cache variable...
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 redirect($a_script)
http redirect to other script
static getSessionExpireValue()
Returns the session expiration value.
static isPasswordModificationEnabled($a_authmode)
Check if password modification is enabled.
Wrapper classes for system notifications.
static getInstance()
Single method to reduce footprint (included files, created instances)
static setPersonalStartingPoint($a_value, $a_ref_id=null)
Set personal starting point setting.
Confirmation screen class.
deleteOwnAccount2()
Delete own account dialog - login redirect.