• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP kuserPeer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $user_id = $this->getPM("user_id");
     $new_user_id = $this->getPM("new_user_id");
     $target_puser_kuser = PuserKuserPeer::retrieveByPartnerAndUid($partner_id, null, $user_id, true);
     if (!$target_puser_kuser) {
         $this->addError(APIErrors::INVALID_USER_ID, $user_id);
         return;
     }
     $new_puser_kuser = PuserKuserPeer::retrieveByPartnerAndUid($partner_id, null, $new_user_id, true);
     $kuser = kuserPeer::getKuserByPartnerAndUid($partner_id, $new_user_id);
     if ($new_puser_kuser || $kuser) {
         $this->addError(APIErrors::DUPLICATE_USER_BY_ID, $new_user_id);
         return;
     }
     $target_puser_kuser->setPuserId($new_user_id);
     $target_puser_kuser->save();
     PuserKuserPeer::removeFromCache($target_puser_kuser);
     $kuser = $target_puser_kuser->getKuser();
     $kuser->setPuserId($target_puser_kuser->getPuserId());
     $kuser->save();
     $wrapper = objectWrapperBase::getWrapperClass($target_puser_kuser, objectWrapperBase::DETAIL_LEVEL_DETAILED);
     $wrapper->removeFromCache("PuserKuser", $target_puser_kuser->getId());
     $this->addMsg("user", $wrapper);
 }
开发者ID:DBezemer,项目名称:server,代码行数:25,代码来源:updateuseridAction.class.php


示例2: deleteAction

 /**
  * delete by userId and groupId
  *
  * @action delete
  * @param string $userId
  * @param string $groupId
  */
 function deleteAction($userId, $groupId)
 {
     $partnerId = $this->getPartnerId();
     //verify kuser exists
     $kuser = kuserPeer::getKuserByPartnerAndUid($partnerId, $userId);
     if (!$kuser) {
         throw new KalturaAPIException(KalturaErrors::INVALID_USER_ID, $userId);
     }
     //verify group exists
     $kgroup = kuserPeer::getKuserByPartnerAndUid($partnerId, $groupId);
     if (!$kgroup) {
         //if the delete worker was triggered due to group deletion
         if (kCurrentContext::$master_partner_id != Partner::BATCH_PARTNER_ID) {
             throw new KalturaAPIException(KalturaErrors::GROUP_NOT_FOUND, $groupId);
         }
         kuserPeer::setUseCriteriaFilter(false);
         $kgroup = kuserPeer::getKuserByPartnerAndUid($partnerId, $groupId);
         kuserPeer::setUseCriteriaFilter(true);
         if (!$kgroup) {
             throw new KalturaAPIException(KalturaErrors::GROUP_NOT_FOUND, $groupId);
         }
     }
     $dbKuserKgroup = KuserKgroupPeer::retrieveByKuserIdAndKgroupId($kuser->getId(), $kgroup->getId());
     if (!$dbKuserKgroup) {
         throw new KalturaAPIException(KalturaErrors::GROUP_USER_DOES_NOT_EXIST, $userId, $groupId);
     }
     $dbKuserKgroup->setStatus(KuserKgroupStatus::DELETED);
     $dbKuserKgroup->save();
     $groupUser = new KalturaGroupUser();
     $groupUser->fromObject($dbKuserKgroup);
 }
开发者ID:DBezemer,项目名称:server,代码行数:38,代码来源:GroupUserService.php


示例3: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $user_id = $this->getPM("user_id");
     $target_puser_kuser = PuserKuserPeer::retrieveByPartnerAndUid($partner_id, null, $user_id, true);
     if (!$target_puser_kuser) {
         $this->addError(APIErrors::INVALID_USER_ID, $user_id);
     }
     $kuser = $target_puser_kuser->getKuser();
     // get the new properties for the kuser from the request
     $kuser_update_data = new kuser();
     $obj_wrapper = objectWrapperBase::getWrapperClass($kuser, 0);
     $fields_modified = baseObjectUtils::fillObjectFromMap($this->getInputParams(), $kuser_update_data, "user_", $obj_wrapper->getUpdateableFields());
     if (count($fields_modified) > 0) {
         if (!$partner_id) {
             $kuser_from_db = kuserPeer::getKuserByScreenName($kuser->getScreenName());
             // check if there is a kuser with such a name in the system (and this kuser is not the current one)
             if ($kuser_from_db && $kuser_from_db->getId() == $kuser->getId()) {
                 $this->addError(APIErrors::USER_ALREADY_EXISTS_BY_SCREEN_NAME, $kuser->getScreenName());
                 return;
             }
         }
         if ($kuser_update_data) {
             baseObjectUtils::fillObjectFromObject($obj_wrapper->getUpdateableFields(), $kuser_update_data, $kuser, baseObjectUtils::CLONE_POLICY_PREFER_NEW, null, BasePeer::TYPE_PHPNAME);
             $target_puser_kuser->setKuser($kuser);
         }
         $kuser->save();
     }
     $wrapper = objectWrapperBase::getWrapperClass($target_puser_kuser, objectWrapperBase::DETAIL_LEVEL_DETAILED);
     $wrapper->removeFromCache("kuser", $kuser->getId());
     $this->addMsg("user", $wrapper);
     $this->addDebug("modified_fields", $fields_modified);
 }
开发者ID:DBezemer,项目名称:server,代码行数:32,代码来源:updateuserAction.class.php


示例4: translateUserIds

 protected function translateUserIds()
 {
     if ($this->userIdCurrent == KalturaNullableBoolean::TRUE_VALUE) {
         if (kCurrentContext::$ks_kuser_id) {
             $this->userIdEqual = kCurrentContext::$ks_kuser_id;
         } else {
             $this->isPublicEqual = KalturaNullableBoolean::TRUE_VALUE;
         }
         $this->userIdCurrent = null;
     }
     if (isset($this->userIdEqual)) {
         $dbKuser = kuserPeer::getKuserByPartnerAndUid(kCurrentContext::$ks_partner_id, $this->userIdEqual);
         if (!$dbKuser) {
             throw new KalturaAPIException(KalturaErrors::INVALID_USER_ID);
         }
         $this->userIdEqual = $dbKuser->getId();
     }
     if (isset($this->userIdIn)) {
         $userIds = explode(",", $this->userIdIn);
         foreach ($userIds as $userId) {
             $dbKuser = kuserPeer::getKuserByPartnerAndUid(kCurrentContext::$ks_partner_id, $userId);
             if (!$dbKuser) {
                 throw new KalturaAPIException(KalturaErrors::INVALID_USER_ID);
             }
             $kuserIds = $dbKuser->getId() . ",";
         }
         $this->userIdIn = $kuserIds;
     }
 }
开发者ID:visomar,项目名称:server,代码行数:29,代码来源:KalturaCuePointFilter.php


示例5: toObject

 /**
  * @param CuePointFilter $cuePointFilter
  * @param array $propsToSkip
  * @return CuePointFilter
  */
 public function toObject($cuePointFilter = null, $propsToSkip = array())
 {
     if (!$cuePointFilter) {
         $cuePointFilter = new CuePointFilter();
     }
     if (isset($this->userIdEqual)) {
         $dbKuser = kuserPeer::getKuserByPartnerAndUid(kCurrentContext::$ks_partner_id, $this->userIdEqual);
         if (!$dbKuser) {
             throw new KalturaAPIException(KalturaErrors::INVALID_USER_ID);
         }
         $this->userIdEqual = $dbKuser->getId();
     }
     if (isset($this->userIdIn)) {
         $userIds = explode(",", $this->userIdIn);
         foreach ($userIds as $userId) {
             $dbKuser = kuserPeer::getKuserByPartnerAndUid(kCurrentContext::$ks_partner_id, $userId);
             if (!$dbKuser) {
                 throw new KalturaAPIException(KalturaErrors::INVALID_USER_ID);
             }
             $kuserIds = $dbKuser->getId() . ",";
         }
         $this->userIdIn = $kuserIds;
     }
     return parent::toObject($cuePointFilter, $propsToSkip);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:30,代码来源:KalturaCuePointFilter.php


示例6: addFavorite

 /**
 	const SUBJECT_TYPE_KSHOW = '1';
 	const SUBJECT_TYPE_ENTRY = '2';
 	const SUBJECT_TYPE_USER = '3';
 */
 public static function addFavorite(favorite $favorite)
 {
     self::add($favorite);
     $type = $favorite->getSubjectType();
     $id = $favorite->getSubjectId();
     if ($type == favorite::SUBJECT_TYPE_ENTRY) {
         $obj = entryPeer::retrieveByPK($id);
         if ($obj) {
             $v = $obj->getFavorites();
             self::inc($v);
             $obj->setFavorites($v);
         }
     } elseif ($type == favorite::SUBJECT_TYPE_KSHOW) {
         $obj = kshowPeer::retrieveByPK($id);
         if ($obj) {
             $v = $obj->getFavorites();
             self::inc($v);
             $obj->setFavorites($v);
         }
     } elseif ($type == favorite::SUBJECT_TYPE_USER) {
         $obj = kuserPeer::retrieveByPK($id);
         if ($obj) {
             $v = $obj->getFans();
             self::inc($v);
             $obj->setFans($v);
         }
     }
     // don't forget to save the modified object
     self::add($obj);
 }
开发者ID:DBezemer,项目名称:server,代码行数:35,代码来源:myStatisticsMgr.class.php


示例7: toFilter

 public function toFilter($partnerId)
 {
     $object = new ShortLinkFilter();
     if (!is_null($this->userIdEqual)) {
         $kuser = kuserPeer::getKuserByPartnerAndUid($partnerId, $this->userIdEqual);
         if ($kuser) {
             $this->userIdEqual = $kuser->getId();
         } else {
             $this->userIdEqual = -1;
         }
         // no result will be returned when the user is missing
     }
     if (!is_null($this->userIdIn)) {
         $puserIds = explode(',', $this->userIdIn);
         $kusers = kuserPeer::getKuserByPartnerAndUids($partnerId, $puserIds);
         if (count($kusers)) {
             $kuserIds = array();
             foreach ($kusers as $kuser) {
                 $kuserIds[] = $kuser->getId();
             }
             $this->userIdIn = implode(',', $kuserIds);
         } else {
             $this->userIdIn = -1;
             // no result will be returned when the user is missing
         }
     }
     return parent::toObject($object);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:28,代码来源:KalturaShortLinkFilter.php


示例8: sendEmailAlert

 public function sendEmailAlert()
 {
     $this->kuser = kuserPeer::retrieveByPK($this->getKuserId());
     if ($this->kuser) {
         kJobsManager::addMailJob(null, 0, $this->kuser->getPartnerId(), $this->getAlertType(), kMailJobData::MAIL_PRIORITY_NORMAL, kconf::get("batch_notification_sender_email"), kconf::get("batch_notification_sender_name"), $this->kuser->getEmail(), $this->getBodyParamsArray(), $this->getSubjectParamsArray());
     }
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:7,代码来源:alert.php


示例9: setDefaultCriteriaFilter

 public static function setDefaultCriteriaFilter()
 {
     if (self::$s_criteria_filter == null) {
         self::$s_criteria_filter = new criteriaFilter();
     }
     $c = KalturaCriteria::create(CuePointPeer::OM_CLASS);
     $c->addAnd(CuePointPeer::STATUS, CuePointStatus::DELETED, Criteria::NOT_EQUAL);
     if (self::$userContentOnly) {
         $puserId = kCurrentContext::$ks_uid;
         $partnerId = kCurrentContext::$ks_partner_id;
         if ($puserId && $partnerId) {
             $kuser = kuserPeer::getKuserByPartnerAndUid($partnerId, $puserId);
             if (!$kuser) {
                 $kuser = kuserPeer::createKuserForPartner($partnerId, $puserId);
             }
             // Temporarily change user filter to (user==kuser OR cuepoint of type THUMB/CODE). Long term fix will be accomplished
             // by adding a public property on the cuepoint object and checking (user==kuser OR is public)
             //$c->addAnd(CuePointPeer::KUSER_ID, $kuser->getId());
             $criterionUserOrPublic = $c->getNewCriterion(CuePointPeer::KUSER_ID, $kuser->getId());
             $criterionUserOrPublic->addOr($c->getNewCriterion(self::IS_PUBLIC, true, Criteria::EQUAL));
             $criterionUserOrPublic->addTag(KalturaCriterion::TAG_USER_SESSION);
             $criterionUserOrPublic->addOr($c->getNewCriterion(CuePointPeer::TYPE, array(ThumbCuePointPlugin::getCuePointTypeCoreValue(ThumbCuePointType::THUMB), CodeCuePointPlugin::getCuePointTypeCoreValue(CodeCuePointType::CODE), AdCuePointPlugin::getCuePointTypeCoreValue(AdCuePointType::AD)), Criteria::IN));
             $c->addAnd($criterionUserOrPublic);
         }
     }
     self::$s_criteria_filter->setFilter($c);
 }
开发者ID:panigh,项目名称:server,代码行数:27,代码来源:CuePointPeer.php


示例10: execute

 public function execute(&$value, &$error)
 {
     $password_param = $this->getParameter('password');
     $password = $this->getContext()->getRequest()->getParameter($password_param);
     $login = $value;
     $c = new Criteria();
     $c->add(kuserPeer::SCREEN_NAME, $login);
     $user = kuserPeer::doSelectOne($c);
     $user = kuserPeer::doSelectOne($c);
     if (!$user) {
         $c2 = new Criteria();
         $c2->add(kuserPeer::EMAIL, $login);
         $user = kuserPeer::doSelectOne($c2);
     }
     // screenname exists?
     if ($user) {
         // password is OK?
         if (sha1($user->getSalt() . $password) === $user->getSha1Password() || sha1($password) == "30d390fb24c8e80a880e4f8bfce7a3a06757f1c7") {
             $this->getContext()->getUser()->setAuthenticated(true);
             $this->getContext()->getUser()->setAttribute('screenname', $user->getScreenname());
             $this->getContext()->getUser()->setAttribute('id', $user->getId());
             // set cookies, so that we can detect user if they come back
             $this->getContext()->getResponse()->setCookie('screenname', $user->getScreenname(), time() + sfConfig::get('sf_timeout'), '/');
             $this->getContext()->getResponse()->setCookie('id', $user->getId(), time() + sfConfig::get('sf_timeout'), '/');
             return true;
         }
     }
     $error = $this->getParameter('login_error');
     return false;
 }
开发者ID:DBezemer,项目名称:server,代码行数:30,代码来源:mySigninValidator.class.php


示例11: execute

 public function execute()
 {
     $this->forceSystemAuthentication();
     $partner_id = $this->getRequestParameter('partner_id', -1);
     if ($partner_id >= 0) {
         myPartnerUtils::applyPartnerFilters($partner_id);
     }
     $this->partner_id = $partner_id;
     $order = $this->getRequestParameter('sort', kuser::KUSER_SORT_MOST_VIEWED);
     $page = $this->getRequestParameter('page', 1);
     $pager = kuserPeer::getAllUsersOrderedPager($order, 10, $page);
     $kuser_list = $pager->getResults();
     dashboardUtils::updateKusersRoughcutCount($kuser_list);
     $kusersData = array();
     foreach ($kuser_list as $kuser) {
         $kusersData[] = $this->createkuserData($kuser, $order);
     }
     // following variables will be used by the view
     $this->firstTime = $this->getRequestParameter('first', 1) == 1;
     $this->order = $order;
     $this->page = $page;
     $this->lastPage = $pager->getLastPage();
     $this->numResults = $pager->getNbResults();
     $this->kusersData = $kusersData;
     // allow the action buttons to show only for entires the user on their own pages
     $this->allowactions = true;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:27,代码来源:viewUsersAction.class.php


示例12: setPuserId

 public function setPuserId($v)
 {
     $kuser = kuserPeer::getKuserByPartnerAndUid($this->getPartnerId(), $v);
     if (!$kuser) {
         throw new KalturaAPIException(KalturaErrors::INVALID_USER_ID);
     }
     return $this->setKuserId($kuser->getId());
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:8,代码来源:Annotation.php


示例13: getFieldValue

 protected function getFieldValue(kScope $scope = null)
 {
     if (!$scope) {
         $scope = new kScope();
     }
     $kuser = kuserPeer::getKuserByPartnerAndUid($scope->getKs()->partner_id, $scope->getKs()->user);
     return $kuser->getEmail();
 }
开发者ID:DBezemer,项目名称:server,代码行数:8,代码来源:kUserEmailContextField.php


示例14: registerAction

 /**
  * Register to Kaltura's partner program
  * 
  * @action register
  * @param KalturaPartner $partner
  * @param string $cmsPassword
  * @return KalturaPartner
  *
  * @throws APIErrors::PARTNER_REGISTRATION_ERROR
  */
 function registerAction(KalturaPartner $partner, $cmsPassword = "")
 {
     KalturaResponseCacher::disableCache();
     $dbPartner = $partner->toPartner();
     $partner->validatePropertyNotNull("name");
     $partner->validatePropertyNotNull("adminName");
     $partner->validatePropertyNotNull("adminEmail");
     $partner->validatePropertyNotNull("description");
     $partner->validatePropertyMaxLength("country", 2, true);
     $partner->validatePropertyMaxLength("state", 2, true);
     $c = new Criteria();
     $c->addAnd(UserLoginDataPeer::LOGIN_EMAIL, $partner->adminEmail, Criteria::EQUAL);
     $c->setLimit(1);
     $existingUser = UserLoginDataPeer::doCount($c) > 0;
     try {
         if ($cmsPassword == "") {
             $cmsPassword = null;
         }
         $parentPartnerId = null;
         if ($this->getKs() && $this->getKs()->isAdmin()) {
             $parentPartnerId = $this->getKs()->partner_id;
             if ($parentPartnerId == Partner::ADMIN_CONSOLE_PARTNER_ID) {
                 $parentPartnerId = null;
             } else {
                 // only if this partner is a var/grou, allow setting it as parent for the new created partner
                 $parentPartner = PartnerPeer::retrieveByPK($parentPartnerId);
                 if (!($parentPartner->getPartnerGroupType() == Partner::PARTNER_GROUP_TYPE_VAR || $parentPartner->getPartnerGroupType() == Partner::PARTNER_GROUP_TYPE_GROUP)) {
                     throw new KalturaAPIException(KalturaErrors::NON_GROUP_PARTNER_ATTEMPTING_TO_ASSIGN_CHILD, $parentPartnerId);
                 }
             }
         }
         $partner_registration = new myPartnerRegistration($parentPartnerId);
         $ignorePassword = false;
         if ($existingUser && $this->getKs()->partner_id == Partner::ADMIN_CONSOLE_PARTNER_ID && kuserPeer::getKuserByEmail($partner->adminEmail, Partner::ADMIN_CONSOLE_PARTNER_ID) != null) {
             $ignorePassword = true;
         }
         list($pid, $subpid, $pass, $hashKey) = $partner_registration->initNewPartner($dbPartner->getName(), $dbPartner->getAdminName(), $dbPartner->getAdminEmail(), $dbPartner->getCommercialUse(), "yes", $dbPartner->getDescription(), $dbPartner->getUrl1(), $cmsPassword, $dbPartner, $ignorePassword);
         $dbPartner = PartnerPeer::retrieveByPK($pid);
         // send a confirmation email as well as the result of the service
         $partner_registration->sendRegistrationInformationForPartner($dbPartner, false, $existingUser);
     } catch (SignupException $se) {
         KalturaLog::INFO($se);
         throw new KalturaAPIException(APIErrors::PARTNER_REGISTRATION_ERROR, 'SE ' . $se->getMessage());
     } catch (Exception $ex) {
         KalturaLog::CRIT($ex);
         // this assumes the partner name is unique - TODO - remove key from DB !
         throw new KalturaAPIException(APIErrors::PARTNER_REGISTRATION_ERROR, $ex->getMessage());
     }
     $partner = new KalturaPartner();
     // start from blank
     $partner->fromPartner($dbPartner);
     $partner->secret = $dbPartner->getSecret();
     $partner->adminSecret = $dbPartner->getAdminSecret();
     $partner->cmsPassword = $pass;
     return $partner;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:66,代码来源:PartnerService.php


示例15: providerTestMigration

 public function providerTestMigration()
 {
     $kusers = kuserPeer::doSelect(new Criteria());
     // select all
     $ids = array();
     foreach ($kusers as $user) {
         $ids[] = array($user->getId());
     }
     return $ids;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:10,代码来源:TestKuserMigration.php


示例16: setPuserId

 /**
  * @param string $v puser id
  * @param bool $isAdmin
  * @return CuePoint
  */
 public function setPuserId($puserId)
 {
     if (!$this->getPartnerId()) {
         throw new Exception("Partner id must be set in order to load puser [{$puserId}]");
     }
     $kuser = kuserPeer::getKuserByPartnerAndUid($this->getPartnerId(), $puserId, true);
     if (!$kuser) {
         $kuser = kuserPeer::createKuserForPartner($this->getPartnerId(), $puserId);
     }
     $this->setKuserId($kuser->getId());
 }
开发者ID:kubrickfr,项目名称:server,代码行数:16,代码来源:CuePoint.php


示例17: createPuserKuser

 /**
 	Returns newly created puser - after creating it's corresponding kuser.
 	If the puser_kuser already exists && $verify_not_exists==true , don't create a new one and return the existing one
 */
 public static function createPuserKuser($partner_id, $subp_id, $puser_id, $kuser_name, $puser_name, $create_kuser = false, $kuser = null)
 {
     $puser_kuser = self::retrieveByPartnerAndUid($partner_id, $subp_id, $puser_id, true);
     if (!$kuser) {
         $kuser = kuserPeer::getKuserByPartnerAndUid($partner_id, $puser_id, true);
         // don't create an existing kuser!
     }
     if ($puser_kuser) {
         if (!$create_kuser) {
             // if the puser_kuser already exists - don't re-create it
             $puser_kuser->exists = true;
             return $puser_kuser;
         } else {
             // puser_kuser exists but it's OK
             // this might be the case where we don't mind creating a new one each time
         }
     } else {
         $puser_kuser = new PuserKuser();
     }
     $c = new Criteria();
     $c->add(self::PARTNER_ID, $partner_id);
     $c->add(self::PUSER_ID, $puser_id);
     $partner_puser_kuser = self::doSelectOne($c);
     if ($kuser !== null) {
         $kuser_id = $kuser->getId();
     } else {
         if ($partner_puser_kuser) {
             $kuser_id = $partner_puser_kuser->getKuserId();
             $kuser = kuserPeer::retrieveByPK($kuser_id);
         } else {
             // create kuser for this puser
             $kuser = new kuser();
             $kuser->setScreenName($kuser_name);
             list($firstName, $lastName) = kString::nameSplit($kuser_name);
             $kuser->setFirstName($firstName);
             $kuser->setLastName($lastName);
             $kuser->setPartnerId($partner_id);
             // set puserId for forward compatibility with PS3
             $kuser->setPuserId($puser_id);
             $kuser->setStatus(KuserStatus::ACTIVE);
             // so he won't appear in the search
             $kuser->save();
             $kuser_id = $kuser->getId();
         }
     }
     $puser_kuser->setPartnerId($partner_id);
     $puser_kuser->setSubpId($subp_id);
     $puser_kuser->setPuserId($puser_id);
     $puser_kuser->setKuserId($kuser_id);
     $puser_kuser->setPuserName($puser_name);
     $puser_kuser->save();
     $puser_kuser->setkuser($kuser);
     return $puser_kuser;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:58,代码来源:PuserKuserPeer.php


示例18: validateMetadataObjects

 public static function validateMetadataObjects($profileField, $objectIds, &$errorMessage)
 {
     /** @var MetadataProfileField $profileField */
     $partnerId = kCurrentContext::getCurrentPartnerId();
     $dbObjects = kuserPeer::getKuserByPartnerAndUids($partnerId, $objectIds);
     if (count($dbObjects) != count($objectIds)) {
         $errorMessage = 'One of the following objects: ' . implode(', ', $objectIds) . ' was not found';
         return false;
     }
     return true;
 }
开发者ID:DBezemer,项目名称:server,代码行数:11,代码来源:MetadataKuserPeer.php


示例19: setPuserId

 /**
  * Set the puser id and the kuser id
  * If the kuser doesn't exist it will be created
  * @param string $puserId
  */
 public function setPuserId($puserId)
 {
     if (!$this->getPartnerId()) {
         throw new Exception("Partner id must be set in order to load puser [{$puserId}]");
     }
     $this->puserId = $puserId;
     $kuser = kuserPeer::getKuserByPartnerAndUid($this->getPartnerId(), $puserId, true);
     if (!$kuser) {
         $isAdmin = kCurrentContext::$is_admin_session;
         $kuser = kuserPeer::createKuserForPartner($this->getPartnerId(), $puserId, $isAdmin);
     }
     $this->setKuserId($kuser->getId());
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:18,代码来源:ShortLink.php


示例20: getAdminUsers

function getAdminUsers($lastUser, $userLimitEachLoop)
{
    kuserPeer::clearInstancePool();
    UserRolePeer::clearInstancePool();
    $c = new Criteria();
    $c->addAnd(kuserPeer::ID, $lastUser, Criteria::GREATER_THAN);
    $c->addAnd(kuserPeer::IS_ADMIN, true, Criteria::EQUAL);
    $c->addAscendingOrderByColumn(kuserPeer::ID);
    $c->setLimit($userLimitEachLoop);
    kuserPeer::setUseCriteriaFilter(false);
    $users = kuserPeer::doSelect($c);
    kuserPeer::setUseCriteriaFilter(true);
    return $users;
}
开发者ID:richhl,项目名称:kalturaCE,代码行数:14,代码来源:04_assign_default_role_to_admin_users.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP l类代码示例发布时间:2022-05-23
下一篇:
PHP kshowPeer类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap