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


PHP ilObjUser::getAuthMode方法代码示例

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


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

示例1: handleMembership

 /**
  * Assign mmissing course/groups to new user accounts
  * @param ilObjUser $user
  */
 protected static function handleMembership(ilObjUser $user)
 {
     $GLOBALS['ilLog']->write(__METHOD__ . ': Handling ECS assignments ');
     include_once './Services/WebServices/ECS/classes/class.ilECSSetting.php';
     if ($user->getAuthMode() != ilECSSetting::lookupAuthMode()) {
         $GLOBALS['ilLog']->write(__METHOD__ . ': Not user with authmode ' . ilECSSetting::lookupAuthMode());
         return TRUE;
     }
     include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseMemberAssignment.php';
     $assignment_ids = ilECSCourseMemberAssignment::lookupMissingAssignmentsOfUser($user->getExternalAccount());
     foreach ($assignment_ids as $obj_id) {
         include_once './Services/Membership/classes/class.ilParticipants.php';
         $part = ilParticipants::getInstanceByObjId($obj_id);
         $part->add($user->getId(), IL_CRS_MEMBER);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:20,代码来源:class.ilECSAppEventListener.php

示例2: verifyEndTag


//.........这里部分代码省略.........
             break;
         case "PostalCode":
             $this->userObj->setZipCode($this->cdata);
             break;
         case "Country":
             $this->userObj->setCountry($this->cdata);
             break;
         case "PhoneOffice":
             $this->userObj->setPhoneOffice($this->cdata);
             break;
         case "PhoneHome":
             $this->userObj->setPhoneHome($this->cdata);
             break;
         case "PhoneMobile":
             $this->userObj->setPhoneMobile($this->cdata);
             break;
         case "Fax":
             $this->userObj->setFax($this->cdata);
             break;
         case "Hobby":
             $this->userObj->setHobby($this->cdata);
             break;
         case "Comment":
             $this->userObj->setComment($this->cdata);
             break;
         case "Department":
             $this->userObj->setDepartment($this->cdata);
             break;
         case "Matriculation":
             $this->userObj->setMatriculation($this->cdata);
             break;
         case "ExternalAccount":
             //echo "-".$this->userObj->getAuthMode()."-".$this->userObj->getLogin()."-";
             $am = $this->userObj->getAuthMode() == "default" || $this->userObj->getAuthMode() == "" ? ilAuthUtils::_getAuthModeName($ilSetting->get('auth_mode')) : $this->userObj->getAuthMode();
             $loginForExternalAccount = trim($this->cdata) == "" ? "" : ilObjUser::_checkExternalAuthAccount($am, trim($this->cdata));
             switch ($this->action) {
                 case "Insert":
                     if ($loginForExternalAccount != "") {
                         $this->logWarning($this->userObj->getLogin(), $lng->txt("usrimport_no_insert_ext_account_exists") . " (" . $this->cdata . ")");
                     }
                     break;
                 case "Update":
                     if ($loginForExternalAccount != "") {
                         $externalAccountHasChanged = trim($this->cdata) != ilObjUser::_lookupExternalAccount($this->user_id);
                         if ($externalAccountHasChanged && trim($loginForExternalAccount) != trim($this->userObj->getLogin())) {
                             $this->logWarning($this->userObj->getLogin(), $lng->txt("usrimport_no_update_ext_account_exists") . " (" . $this->cdata . " for " . $loginForExternalAccount . ")");
                         }
                     }
                     break;
             }
             if ($externalAccountHasChanged) {
                 $this->userObj->setExternalAccount(trim($this->cdata));
             }
             break;
         case "Active":
             if ($this->cdata != "true" && $this->cdata != "false") {
                 $this->logFailure($this->userObj->getLogin(), sprintf($lng->txt("usrimport_xml_element_content_illegal"), "Active", $this->cdata));
             }
             $this->currActive = $this->cdata;
             break;
         case "TimeLimitOwner":
             if (!preg_match("/\\d+/", $this->cdata)) {
                 $this->logFailure($this->userObj->getLogin(), sprintf($lng->txt("usrimport_xml_element_content_illegal"), "TimeLimitOwner", $this->cdata));
             } elseif (!$ilAccess->checkAccess('cat_administrate_users', '', $this->cdata)) {
                 $this->logFailure($this->userObj->getLogin(), sprintf($lng->txt("usrimport_xml_element_content_illegal"), "TimeLimitOwner", $this->cdata));
             } elseif ($ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($this->cdata)) != 'cat' && !(int) $this->cdata == USER_FOLDER_ID) {
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:67,代码来源:class.ilUserImportParser.php

示例3: handleMembership

 /**
  * Assign mmissing course/groups to new user accounts
  * @param ilObjUser $user
  */
 protected function handleMembership(ilObjUser $user)
 {
     if ($user->getAuthMode() != ilECSSetting::lookupAuthMode()) {
         return true;
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:10,代码来源:class.ilECSAppEventListener.php


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