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


PHP kuserPeer::setDefaultCriteriaFilter方法代码示例

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


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

示例1: tearDown

 /**
  * Cleans up the environment after running a test.
  */
 protected function tearDown()
 {
     kuserPeer::clearInstancePool();
     UserLoginDataPeer::clearInstancePool();
     kuserPeer::setDefaultCriteriaFilter(false);
     UserLoginDataPeer::setUseCriteriaFilter(false);
     $this->clientConfig = null;
     $this->client = null;
     $this->nextUserId = null;
     foreach ($this->createdDbObjects as $obj) {
         try {
             if (get_class($obj) == 'kuser') {
                 $updated = kuserPeer::retrieveByPK($obj->getId());
                 if ($updated) {
                     $loginData = UserLoginDataPeer::retrieveByPK($updated->getLoginDataId());
                     if ($loginData) {
                         $loginData->delete();
                     }
                 }
             }
             $obj->delete();
         } catch (PropelException $e) {
         }
     }
     parent::tearDown();
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:29,代码来源:UserServiceTest.php

示例2:

 /**
  * Returns the default criteria filter
  *
  * @return     criteriaFilter The default criteria filter.
  */
 public static function &getCriteriaFilter()
 {
     if (self::$s_criteria_filter == null) {
         kuserPeer::setDefaultCriteriaFilter();
     }
     return self::$s_criteria_filter;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:12,代码来源:BasekuserPeer.php

示例3:

 /**
  * Returns the default criteria filter
  *
  * @return     criteriaFilter The default criteria filter.
  */
 public static function &getCriteriaFilter()
 {
     if (self::$s_criteria_filter == null) {
         kuserPeer::setDefaultCriteriaFilter();
     }
     $partnerCriteria = myPartnerUtils::getPartnerCriteriaParams('kuser');
     if ($partnerCriteria) {
         call_user_func_array(array('kuserPeer', 'addPartnerToCriteria'), $partnerCriteria);
     }
     return self::$s_criteria_filter;
 }
开发者ID:dozernz,项目名称:server,代码行数:16,代码来源:BasekuserPeer.php

示例4: loginImpl

 /**
  * Get a session using user email and password
  * 
  * @param string $puserId
  * @param string $loginEmail
  * @param string $password
  * @param int $partnerId
  * @param int $expiry
  * @param string $privileges
  * 
  * @return string KS
  *
  * @throws KalturaErrors::USER_NOT_FOUND
  * @thrown KalturaErrors::LOGIN_RETRIES_EXCEEDED
  * @thrown KalturaErrors::LOGIN_BLOCKED
  * @thrown KalturaErrors::PASSWORD_EXPIRED
  * @thrown KalturaErrors::INVALID_PARTNER_ID
  * @thrown KalturaErrors::INTERNAL_SERVERL_ERROR
  * @throws KalturaErrors::USER_IS_BLOCKED
  */
 protected function loginImpl($puserId, $loginEmail, $password, $partnerId = null, $expiry = 86400, $privileges = '*')
 {
     KalturaResponseCacher::disableCache();
     kuserPeer::setDefaultCriteriaFilter();
     kuserPeer::setUseCriteriaFilter(true);
     // if a KS of a specific partner is used, don't allow logging in to a different partner
     if ($this->getPartnerId() && $partnerId && $this->getPartnerId() != $partnerId) {
         throw new KalturaAPIException(KalturaErrors::INVALID_PARTNER_ID, $partnerId);
     }
     try {
         if ($loginEmail) {
             $user = UserLoginDataPeer::userLoginByEmail($loginEmail, $password, $partnerId);
         } else {
             $user = kuserPeer::userLogin($puserId, $password, $partnerId);
         }
     } catch (kUserException $e) {
         $code = $e->getCode();
         if ($code == kUserException::LOGIN_DATA_NOT_FOUND) {
             throw new KalturaAPIException(KalturaErrors::USER_NOT_FOUND);
         }
         if ($code == kUserException::USER_NOT_FOUND) {
             throw new KalturaAPIException(KalturaErrors::USER_NOT_FOUND);
         } else {
             if ($code == kUserException::LOGIN_RETRIES_EXCEEDED) {
                 throw new KalturaAPIException(KalturaErrors::LOGIN_RETRIES_EXCEEDED);
             } else {
                 if ($code == kUserException::LOGIN_BLOCKED) {
                     throw new KalturaAPIException(KalturaErrors::LOGIN_BLOCKED);
                 } else {
                     if ($code == kUserException::PASSWORD_EXPIRED) {
                         throw new KalturaAPIException(KalturaErrors::PASSWORD_EXPIRED);
                     } else {
                         if ($code == kUserException::WRONG_PASSWORD) {
                             throw new KalturaAPIException(KalturaErrors::USER_WRONG_PASSWORD);
                         } else {
                             if ($code == kUserException::USER_IS_BLOCKED) {
                                 throw new KalturaAPIException(KalturaErrors::USER_IS_BLOCKED);
                             }
                         }
                     }
                 }
             }
         }
         throw new $e();
     }
     if (!$user) {
         throw new KalturaAPIException(KalturaErrors::LOGIN_DATA_NOT_FOUND);
     }
     if ($partnerId && $user->getPartnerId() != $partnerId || $this->getPartnerId() && !$partnerId && $user->getPartnerId() != $this->getPartnerId()) {
         throw new KalturaAPIException(KalturaErrors::INVALID_PARTNER_ID, $partnerId);
     }
     $partner = PartnerPeer::retrieveByPK($user->getPartnerId());
     if (!$partner || $partner->getStatus() == Partner::PARTNER_STATUS_FULL_BLOCK) {
         throw new KalturaAPIException(KalturaErrors::INVALID_PARTNER_ID, $user->getPartnerId());
     }
     $ks = null;
     $admin = $user->getIsAdmin() ? KalturaSessionType::ADMIN : KalturaSessionType::USER;
     // create a ks for this admin_kuser as if entered the admin_secret using the API
     kSessionUtils::createKSessionNoValidations($partner->getId(), $user->getPuserId(), $ks, $expiry, $admin, "", $privileges);
     return $ks;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:81,代码来源:KalturaBaseUserService.php


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