ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilPersonalSettingsGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
12{
13 var $tpl;
14 var $lng;
15 var $ilias;
16 var $ctrl;
17
21 function __construct()
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 }
41
45 function &executeCommand()
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 }
61
66 public function saveMailOptions()
67 {
75 global $ilUser, $lng, $ilTabs, $ilSetting, $rbacsystem;
76
77 include_once 'Services/Mail/classes/class.ilMailGlobalServices.php';
78 if(!$rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId()))
79 {
80 $this->ilias->raiseError($lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
81 }
82
83 $lng->loadLanguageModule('mail');
84
85 $this->__initSubTabs('showMailOptions');
86 $ilTabs->activateTab('mail_settings');
87
88 $this->setHeader();
89
90 require_once 'Services/Mail/classes/class.ilMailOptions.php';
91 $mailOptions = new ilMailOptions($ilUser->getId());
92 if($ilSetting->get('usr_settings_hide_mail_incoming_mail') != '1' &&
93 $ilSetting->get('usr_settings_disable_mail_incoming_mail') != '1')
94 {
95 $incoming_type = (int)$_POST['incoming_type'];
96 }
97 else
98 {
99 $incoming_type = $mailOptions->getIncomingType();
100 }
101
102 $this->initMailOptionsForm();
103 if($this->form->checkInput())
104 {
105 $mailOptions->updateOptions(
106 ilUtil::stripSlashes($_POST['signature']),
107 (int)$_POST['linebreak'],
108 $incoming_type,
109 (int)$_POST['cronjob_notification']
110 );
111
112 ilUtil::sendSuccess($lng->txt('mail_options_saved'));
113 }
114
115 if(!isset($_POST['incoming_type']))
116 {
117 $_POST['incoming_type'] = $mailOptions->getIncomingType();
118 }
119
120 $this->form->setValuesByPost();
121
122 $this->tpl->setContent($this->form->getHTML());
123 $this->tpl->show();
124 }
125
129 private function initMailOptionsForm()
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 }
185
189 private function setMailOptionsValuesByDB()
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 }
209
213 public function showMailOptions()
214 {
220 global $ilTabs, $lng, $rbacsystem;
221
222 include_once 'Services/Mail/classes/class.ilMailGlobalServices.php';
223 if(!$rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId()))
224 {
225 $this->ilias->raiseError($lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
226 }
227
228 $lng->loadLanguageModule('mail');
229
230 $this->__initSubTabs('showMailOptions');
231 $ilTabs->activateTab('mail_settings');
232
233 $this->setHeader();
234
235 $this->initMailOptionsForm();
237
238 $this->tpl->setContent($this->form->getHTML());
239 $this->tpl->show();
240 }
241
242/* function showjsMath()
243 {
244 global $lng, $ilCtrl, $tpl, $ilUser;
245
246 $this->__initSubTabs("showjsMath");
247 $this->setHeader();
248
249 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
250 $form = new ilPropertyFormGUI();
251 $form->setFormAction($ilCtrl->getFormAction($this));
252 $form->setTitle($lng->txt("jsmath_settings"));
253
254 // Enable jsMath
255 include_once "./Services/Administration/classes/class.ilSetting.php";
256 $jsMathSetting = new ilSetting("jsMath");
257 $enable = new ilCheckboxInputGUI($lng->txt("jsmath_enable_user"), "enable");
258 $checked = ($ilUser->getPref("js_math") === FALSE) ? $jsMathSetting->get("makedefault") : $ilUser->getPref("js_math");
259 $enable->setChecked($checked);
260 $enable->setInfo($lng->txt("jsmath_enable_user_desc"));
261 $form->addItem($enable);
262
263 $form->addCommandButton("savejsMath", $lng->txt("save"));
264 $form->addCommandButton("showjsMath", $lng->txt("cancel"));
265
266 $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
267 $this->tpl->show();
268 }
269
270 function savejsMath()
271 {
272 global $ilCtrl, $ilUser;
273
274 include_once "./Services/Administration/classes/class.ilSetting.php";
275 $jsMathSetting = new ilSetting("jsMath");
276 if ($jsMathSetting->get("enable"))
277 {
278 if ($_POST["enable"])
279 {
280 $ilUser->writePref("js_math", "1");
281 }
282 else
283 {
284 $ilUser->writePref("js_math", "0");
285 }
286 }
287 $ilCtrl->redirect($this, "showjsMath");
288 }
289*/
290 // init sub tabs
291 function __initSubTabs($a_cmd)
292 {
296 global $ilTabs, $ilSetting, $ilHelp, $rbacsystem, $ilUser;
297
298 $ilHelp->setScreenIdComponent("user");
299
300 $showPassword = ($a_cmd == 'showPassword') ? true : false;
301 $showGeneralSettings = ($a_cmd == 'showGeneralSettings') ? true : false;
302 $showMailOptions = ($a_cmd == 'showMailOptions') ? true : false;
303// $showjsMath = ($a_cmd == 'showjsMath') ? true : false;
304 $showChatOptions = ($a_cmd == 'showChatOptions') ? true : false;
305
306 // old profile
307
308 // general settings
309 $ilTabs->addTarget("general_settings", $this->ctrl->getLinkTarget($this, "showGeneralSettings"),
310 "", "", "", $showGeneralSettings);
311
312 // password
313 if ($this->allowPasswordChange())
314 {
315 $ilTabs->addTarget("password", $this->ctrl->getLinkTarget($this, "showPassword"),
316 "", "", "", $showPassword);
317 }
318
319 include_once 'Services/Mail/classes/class.ilMailGlobalServices.php';
320 if($rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId()))
321 {
322 $ilTabs->addTarget("mail_settings", $this->ctrl->getLinkTarget($this, "showMailOptions"), "", "", "", $showMailOptions);
323 }
324
325 $chatSettings = new ilSetting('chatroom');
326 $notificationSettings = new ilSetting('notifications');
327 if(
328 $chatSettings->get('chat_enabled', false) &&
329 $notificationSettings->get('enable_osd', false) &&
330 $chatSettings->get('play_invitation_sound', false)
331 )
332 {
333 $ilTabs->addTarget('chat_settings', $this->ctrl->getLinkTarget($this, 'showChatOptions'), '', '', '', $showChatOptions);
334 }
335
336 include_once "./Services/Administration/classes/class.ilSetting.php";
337/* $jsMathSetting = new ilSetting("jsMath");
338 if ($jsMathSetting->get("enable"))
339 {
340 $ilTabs->addTarget("jsmath_extt_jsmath", $this->ctrl->getLinkTarget($this, "showjsMath"),
341 "", "", "", $showjsMath);
342 }*/
343
344 if((bool)$ilSetting->get('user_delete_own_account') &&
345 $ilUser->getId() != SYSTEM_USER_ID)
346 {
347 $ilTabs->addTab("delacc", $this->lng->txt('user_delete_own_account'),
348 $this->ctrl->getLinkTarget($this, "deleteOwnAccount1"));
349 }
350 }
351
355 private function getChatSettingsForm()
356 {
361 global $lng;
362
363 include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
364 $form = new ilPropertyFormGUI();
365
366 $form->setFormAction($this->ctrl->getFormAction($this, 'saveChatOptions'));
367 $form->setTitle($lng->txt("chat_settings"));
368
369 $chb = new ilCheckboxInputGUI('', 'play_invitation_sound');
370 $chb->setOptionTitle($this->lng->txt('play_invitation_sound'));
371 $form->addItem($chb);
372
373 $form->addCommandButton("saveChatOptions", $lng->txt("save"));
374
375 return $form;
376 }
377
381 public function saveChatOptions()
382 {
389 global $ilUser, $lng, $ilCtrl;
390
391 $chatSettings = new ilSetting('chatroom');
392 $notificationSettings = new ilSetting('notifications');
393 if(!(
394 $chatSettings->get('chat_enabled', false) &&
395 $notificationSettings->get('enable_osd', false) &&
396 $chatSettings->get('play_invitation_sound', false)
397 )
398 )
399 {
400 $ilCtrl->redirect($this);
401 }
402
403 $form = $this->getChatSettingsForm();
404 if(!$form->checkInput())
405 {
406 $this->showChatOptions($form);
407 return;
408 }
409
410 $ilUser->setPref('chat_play_invitation_sound', (int)$form->getInput('play_invitation_sound'));
411 $ilUser->writePrefs();
412
413 ilUtil::sendSuccess($lng->txt('saved_successfully'));
414 $this->showChatOptions($form);
415 }
416
420 public function setHeader()
421 {
422 $this->tpl->setVariable('HEADER', $this->lng->txt('personal_settings'));
423 }
424
428 public function showChatOptions(ilPropertyFormGUI $form = null)
429 {
434 global $ilUser, $ilCtrl;
435
436 $chatSettings = new ilSetting('chatroom');
437 $notificationSettings = new ilSetting('notifications');
438 if(!(
439 $chatSettings->get('chat_enabled', false) &&
440 $notificationSettings->get('enable_osd', false) &&
441 $chatSettings->get('play_invitation_sound', false)
442 ))
443 {
444 $ilCtrl->redirect($this);
445 }
446
447 $this->__initSubTabs('showChatOptions');
448 $this->setHeader();
449
450 if($form)
451 {
452 $form->setValuesByPost();
453 }
454 else
455 {
456 $form = $this->getChatSettingsForm();
457 $form->setValuesByArray(array(
458 'play_invitation_sound' => $ilUser->getPref('chat_play_invitation_sound')
459 ));
460 }
461
462 $this->tpl->setContent($form->getHTML());
463 $this->tpl->show();
464 }
465
466
467 //
468 //
469 // PASSWORD FORM
470 //
471 //
472
477 function showPassword($a_no_init = false, $hide_form = false)
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 }
507
513 public function initPasswordForm()
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 }
587
591 protected function allowPasswordChange()
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 }
606
611 public function savePassword()
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 }
709
710 //
711 //
712 // GENERAL SETTINGS FORM
713 //
714 //
715
720 function workWithUserSetting($setting)
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 }
733
738 function userSettingVisible($setting)
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 }
748
753 function userSettingEnabled($setting)
754 {
755 $result = TRUE;
756 if ($this->settings["usr_settings_disable_".$setting] == 1)
757 {
758 $result = FALSE;
759 }
760 return $result;
761 }
762
766 function showGeneralSettings($a_no_init = false)
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 }
786
791 public function initGeneralSettingsForm()
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 }
1062
1066 public function saveGeneralSettings()
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 }
1199
1203 protected function deleteOwnAccount1()
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 }
1226
1230 protected function deleteOwnAccount2()
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 }
1253
1254 protected function abortDeleteOwnAccount()
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 }
1263
1264 protected function deleteOwnAccountLogout()
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 }
1279
1283 protected function deleteOwnAccount3()
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 }
1307
1311 protected function deleteOwnAccount4()
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 }
1370}
1371?>
$result
const AUTH_SHIBBOLETH
const AUTH_LOCAL
const AUTH_CAS
const IL_CAL_UNIX
const IL_MAIL_BOTH
const IL_MAIL_LOCAL
const IL_MAIL_EMAIL
static isPasswordModificationEnabled($a_authmode)
Check if password modification is enabled.
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.
Confirmation screen class.
static _isActive()
Static getter.
static setUseRelativeDates($a_status)
set use relative dates
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
_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)
static getMailObjectRefId()
Determines the reference id of the mail object and stores this information in a local cache variable.
Class UserMail this class handles user mails.
Class Mail this class handles base functions for mail handling.
This class represents a number property in a property form.
_lookupActivatedStyle($a_skin, $a_style)
lookup if a style is activated
_lookupEmail($a_user_id)
Lookup email.
static _lookupObjId($a_id)
This class represents a password property in a property form.
GUI class for personal profile.
initGeneralSettingsForm()
Init general settings form.
userSettingEnabled($setting)
Returns TRUE if user setting is enabled, FALSE otherwise.
deleteOwnAccount4()
Delete own account dialog - action incl.
deleteOwnAccount1()
Delete own account dialog - 1st confirmation.
deleteOwnAccount2()
Delete own account dialog - login redirect.
deleteOwnAccount3()
Delete own account dialog - final confirmation.
initPasswordForm()
Init password form.
allowPasswordChange()
Check, whether password change is allowed for user.
initMailOptionsForm()
Initialises the mail options form.
setMailOptionsValuesByDB()
Fetches data from model and loads this data into form.
userSettingVisible($setting)
Returns TRUE if user setting is visible, FALSE otherwise.
saveGeneralSettings()
Save general settings.
showPassword($a_no_init=false, $hide_form=false)
workWithUserSetting($setting)
Returns TRUE if working with the given user setting is allowed, FALSE otherwise.
showGeneralSettings($a_no_init=false)
General settings form.
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.
const SESSION_CLOSE_USER
static set($a_var, $a_val)
Set a value.
static setClosingContext($a_context)
set closing context (for statistics)
static get($a_var)
Get a value.
static getSessionExpireValue()
Returns the session expiration value.
ILIAS Setting Class.
parses the template.xml that defines all styles of the current template
Wrapper classes for system notifications.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static _getInstance()
Get instance.
static getInstance()
Single method to reduce footprint (included files, created instances)
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.
static setPersonalStartingPoint($a_value, $a_ref_id=null)
Set personal starting point setting.
const START_REPOSITORY_OBJ
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
http redirect to other script
static isPassword($a_passwd, &$customError=null)
validates a password @access public
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getPasswordRequirementsInfo()
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)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$_POST['username']
Definition: cron.php:12
$data
$style
Definition: example_012.php:70
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file)
global $ilSetting
Definition: privfeed.php:40
$cmd
Definition: sahs_server.php:35
if(!is_array($argv)) $options
global $ilUser
Definition: imgupload.php:15