当前位置: 首页>>代码示例>>PHP>>正文


PHP ilUserUtil::setPersonalStartingPoint方法代码示例

本文整理汇总了PHP中ilUserUtil::setPersonalStartingPoint方法的典型用法代码示例。如果您正苦于以下问题:PHP ilUserUtil::setPersonalStartingPoint方法的具体用法?PHP ilUserUtil::setPersonalStartingPoint怎么用?PHP ilUserUtil::setPersonalStartingPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilUserUtil的用法示例。


在下文中一共展示了ilUserUtil::setPersonalStartingPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: saveGeneralSettings

 /**
  * Save general settings
  */
 public function saveGeneralSettings()
 {
     global $tpl, $lng, $ilCtrl, $ilUser;
     $this->initGeneralSettingsForm();
     if ($this->form->checkInput()) {
         if ($this->workWithUserSetting("skin_style")) {
             //set user skin and style
             if ($_POST["skin_style"] != "") {
                 $sknst = explode(":", $_POST["skin_style"]);
                 if ($ilUser->getPref("style") != $sknst[1] || $ilUser->getPref("skin") != $sknst[0]) {
                     $ilUser->setPref("skin", $sknst[0]);
                     $ilUser->setPref("style", $sknst[1]);
                 }
             }
         }
         // language
         if ($this->workWithUserSetting("language")) {
             $ilUser->setLanguage($_POST["language"]);
         }
         // hits per page
         if ($this->workWithUserSetting("hits_per_page")) {
             if ($_POST["hits_per_page"] != "") {
                 $ilUser->setPref("hits_per_page", $_POST["hits_per_page"]);
             }
         }
         // set show users online
         if ($this->workWithUserSetting("show_users_online")) {
             $ilUser->setPref("show_users_online", $_POST["show_users_online"]);
         }
         // store last visited?
         global $ilNavigationHistory;
         $ilUser->setPref("store_last_visited", (int) $_POST["store_last_visited"]);
         if ((int) $_POST["store_last_visited"] > 0) {
             $ilNavigationHistory->deleteDBEntries();
             if ((int) $_POST["store_last_visited"] == 2) {
                 $ilNavigationHistory->deleteSessionEntries();
             }
         }
         // set hide own online_status
         if ($this->workWithUserSetting("hide_own_online_status")) {
             if ($_POST["hide_own_online_status"] == 1) {
                 $ilUser->setPref("hide_own_online_status", "y");
             } else {
                 $ilUser->setPref("hide_own_online_status", "n");
             }
         }
         // set show users online
         if ($this->workWithUserSetting("screen_reader_optimization")) {
             $ilUser->setPref("screen_reader_optimization", $_POST["screen_reader_optimization"]);
         }
         // session reminder
         include_once 'Services/Authentication/classes/class.ilSessionReminder.php';
         if (ilSessionReminder::isGloballyActivated()) {
             $ilUser->setPref('session_reminder_enabled', (int) $this->form->getInput('session_reminder_enabled'));
             $ilUser->setPref('session_reminder_lead_time', $this->form->getInput('session_reminder_lead_time'));
         }
         // starting point
         include_once "Services/User/classes/class.ilUserUtil.php";
         if (ilUserUtil::hasPersonalStartingPoint()) {
             ilUserUtil::setPersonalStartingPoint($this->form->getInput('usr_start'), $this->form->getInput('usr_start_ref_id'));
         }
         // selector for unicode characters
         global $ilSetting;
         if ($ilSetting->get('char_selector_availability') > 0) {
             require_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
             $char_selector = new ilCharSelectorGUI(ilCharSelectorConfig::CONTEXT_USER);
             $char_selector->getFormValues($this->form);
             $ilUser->setPref('char_selector_availability', $char_selector->getConfig()->getAvailability());
             $ilUser->setPref('char_selector_definition', $char_selector->getConfig()->getDefinition());
         }
         $ilUser->update();
         // calendar settings
         include_once 'Services/Calendar/classes/class.ilCalendarUserSettings.php';
         $user_settings = ilCalendarUserSettings::_getInstanceByUserId($ilUser->getId());
         $user_settings->setTimeZone($this->form->getInput("timezone"));
         $user_settings->setDateFormat((int) $this->form->getInput("date_format"));
         $user_settings->setTimeFormat((int) $this->form->getInput("time_format"));
         $user_settings->save();
         ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
         $ilCtrl->redirect($this, "showGeneralSettings");
     }
     $this->form->setValuesByPost();
     $this->showGeneralSettings(true);
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:87,代码来源:class.ilPersonalSettingsGUI.php


注:本文中的ilUserUtil::setPersonalStartingPoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。