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


PHP ilObjUser::getPref方法代码示例

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


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

示例1: getUserListHtml

 /**
  * Get User List HTML (to be displayed besides the map)
  */
 function getUserListHtml()
 {
     $list_tpl = new ilTemplate("tpl.openlayers_map_user_list.html", true, true, "Services/Maps");
     $cnt = 0;
     foreach ($this->user_marker as $user_id) {
         if (ilObject::_exists($user_id)) {
             $user = new ilObjUser($user_id);
             $this->css_row = $this->css_row != "tblrow1_mo" ? "tblrow1_mo" : "tblrow2_mo";
             if ($user->getLatitude() != 0 && $user->getLongitude() != 0 && $user->getPref("public_location") == "y") {
                 $list_tpl->setCurrentBlock("item");
                 $list_tpl->setVariable("MARKER_CNT", $cnt);
                 $list_tpl->setVariable("MAP_ID", $this->getMapId());
                 $cnt++;
             } else {
                 $list_tpl->setCurrentBlock("item_no_link");
             }
             $list_tpl->setVariable("CSS_ROW", $this->css_row);
             $list_tpl->setVariable("TXT_USER", $user->getLogin());
             $list_tpl->setVariable("IMG_USER", $user->getPersonalPicturePath("xxsmall"));
             $list_tpl->parseCurrentBlock();
             $list_tpl->touchBlock("row");
         }
     }
     return $list_tpl->get();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:28,代码来源:class.ilOpenLayersMapGUI.php

示例2: validateUser

 /**
  * Check if given user id is valid
  * 
  * @return bool
  */
 protected static function validateUser($a_user_id)
 {
     global $ilUser;
     if (ilObject::_lookupType($a_user_id) != "usr") {
         return false;
     }
     $user = new ilObjUser($a_user_id);
     if ($ilUser->getId() == ANONYMOUS_USER_ID && $user->getPref("public_profile") != "g") {
         return false;
     }
     return true;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:17,代码来源:class.ilPublicUserProfileGUI.php

示例3: importEndTag


//.........这里部分代码省略.........
                             $updateUser->setInstantMessengerId("aim", $this->userObj->getInstantMessengerId("aim"));
                         }
                         if (!is_null($this->userObj->getInstantMessengerId("msn"))) {
                             $updateUser->setInstantMessengerId("msn", $this->userObj->getInstantMessengerId("msn"));
                         }
                         if (!is_null($this->userObj->getInstantMessengerId("icq"))) {
                             $updateUser->setInstantMessengerId("icq", $this->userObj->getInstantMessengerId("icq"));
                         }
                         if (!is_null($this->userObj->getInstantMessengerId("yahoo"))) {
                             $updateUser->setInstantMessengerId("yahoo", $this->userObj->getInstantMessengerId("yahoo"));
                         }
                         if (!is_null($this->userObj->getInstantMessengerId("skype"))) {
                             $updateUser->setInstantMessengerId("skype", $this->userObj->getInstantMessengerId("skype"));
                         }
                         if (!is_null($this->userObj->getInstantMessengerId("jabber"))) {
                             $updateUser->setInstantMessengerId("jabber", $this->userObj->getInstantMessengerId("jabber"));
                         }
                         if (!is_null($this->userObj->getInstantMessengerId("voip"))) {
                             $updateUser->setInstantMessengerId("voip", $this->userObj->getInstantMessengerId("voip"));
                         }
                         // Special handlin since it defaults to 7 (USER_FOLDER_ID)
                         if ($this->time_limit_owner_set) {
                             $updateUser->setTimeLimitOwner($this->userObj->getTimeLimitOwner());
                         }
                         if (count($this->prefs)) {
                             foreach ($this->prefs as $key => $value) {
                                 if ($key != "mail_incoming_type" && $key != "mail_signature" && $key != "mail_linebreak") {
                                     $updateUser->setPref($key, $value);
                                 }
                             }
                         }
                         // save user preferences (skin and style)
                         if ($this->updateLookAndSkin) {
                             $updateUser->setPref("skin", $this->userObj->getPref("skin"));
                             $updateUser->setPref("style", $this->userObj->getPref("style"));
                         }
                         $updateUser->writePrefs();
                         // update mail preferences, to be extended
                         $this->updateMailPreferences($updateUser->getId());
                         // #8759
                         if (count($this->udf_data)) {
                             $updateUser->setUserDefinedData($this->udf_data);
                         }
                         $updateUser->setProfileIncomplete($this->checkProfileIncomplete($updateUser));
                         $updateUser->setTitle($updateUser->getFullname());
                         $updateUser->setDescription($updateUser->getEmail());
                         $updateUser->update();
                         if ($this->ilincdata["id"]) {
                             include_once 'Modules/ILinc/classes/class.ilObjiLincUser.php';
                             $ilinc_user = new ilObjiLincUser($updateUser);
                             $ilinc_user->setVar("id", $this->ilincdata["id"]);
                             $ilinc_user->setVar("login", $this->ilincdata["login"]);
                             $ilinc_user->setVar("passwd", $this->ilincdata["password"]);
                             $ilinc_user->update();
                         }
                         if (count($this->udf_data)) {
                             include_once './Services/User/classes/class.ilUserDefinedData.php';
                             $udd = new ilUserDefinedData($updateUser->getId());
                             foreach ($this->udf_data as $field => $value) {
                                 $udd->set("f_" . $field, $value);
                             }
                             $udd->update();
                         }
                         // update login
                         if (!is_null($this->userObj->getLogin()) && $this->user_id != -1) {
                             try {
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:67,代码来源:class.ilUserImportParser.php

示例4: validateUser

 /**
  * Check if given user id is valid
  * 
  * @return bool
  */
 protected static function validateUser($a_user_id)
 {
     global $ilUser;
     if (ilObject::_lookupType($a_user_id) != "usr") {
         return false;
     }
     $user = new ilObjUser($a_user_id);
     if ($ilUser->getId() == ANONYMOUS_USER_ID && $user->getPref("public_profile") != "g") {
         // #12151
         if ($user->getPref("public_profile") == "y") {
             ilUtil::redirect("login.php?cmd=force_login&target=usr_" . $a_user_id);
         }
         return false;
     }
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:21,代码来源:class.ilPublicUserProfileGUI.php

示例5: addCrsGrpMembers

 public function addCrsGrpMembers()
 {
     global $ilCtrl, $lng;
     $this->pluginObj->includeClass('class.ilXAVCTableGUI.php');
     $this->tabs->activateTab('participants');
     $this->__setSubTabs('participants');
     $this->tabs->activateSubTab("addCrsGrpMembers");
     $lng->loadLanguageModule('crs');
     $my_tpl = new ilTemplate($this->pluginObj->getDirectory() . "/templates/default/tpl.meeting_participant_table.html", true, true);
     $oParticipants = $this->object->getParticipantsObject();
     /** @var $oParticipants  ilGroupParticipants */
     $admins = $oParticipants->getAdmins();
     $tutors = $oParticipants->getTutors();
     $members = $oParticipants->getMembers();
     $all_crs_members = array_unique(array_merge($admins, $tutors, $members));
     $counter = 0;
     $f_result_1 = NULL;
     foreach ($all_crs_members as $user_id) {
         if ($user_id > 0) {
             $tmp_user = new ilObjUser($user_id);
             $firstname = $tmp_user->getFirstname();
             $lastname = $tmp_user->getLastname();
             if ($tmp_user->hasPublicProfile() && $tmp_user->getPref('public_email') == 'y') {
                 $user_mail = $tmp_user->getEmail();
             } else {
                 $user_mail = '';
             }
         }
         $f_result_1[$counter]['checkbox'] = ilUtil::formCheckbox('', 'usr_id[]', $user_id);
         $f_result_1[$counter]['user_name'] = $lastname . ', ' . $firstname;
         $f_result_1[$counter]['email'] = $user_mail;
         ++$counter;
     }
     // show Administrator Table
     $tbl_admin = new ilXAVCTableGUI($this, 'addCrsGrpMembers');
     $ilCtrl->setParameter($this, 'cmd', 'editParticipants');
     $tbl_admin->setTitle($lng->txt("crs_members"));
     $tbl_admin->setId('tbl_admins');
     $tbl_admin->setRowTemplate($this->pluginObj->getDirectory() . "/templates/default/tpl.meeting_participant_row.html", false);
     $tbl_admin->addColumn('', 'checkbox', '1%', true);
     $tbl_admin->addColumn($this->pluginObj->txt('user_name'), 'user_name', '30%');
     $tbl_admin->addColumn($lng->txt('email'), 'email');
     $tbl_admin->setSelectAllCheckbox('usr_id[]');
     $tbl_admin->addMultiCommand('performAddCrsGrpMembers', $this->pluginObj->txt('add_crs_grp_members'));
     $tbl_admin->addCommandButton('editParticipants', $this->pluginObj->txt('cancel'));
     $tbl_admin->setData($f_result_1);
     $my_tpl->setVariable('ADMINS', $tbl_admin->getHTML());
     $this->tpl->setContent($my_tpl->get());
 }
开发者ID:KamuiXenom,项目名称:ILIAS_AdobeConnectPlugin,代码行数:49,代码来源:class.ilObjAdobeConnectGUI.php


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