當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。