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


PHP myPartnerUtils::getPrefix方法代码示例

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


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

示例1: createUserOnDemand

 protected function createUserOnDemand($partner_id, $subp_id, $puser_id, $puser_kuser, $kuser = null)
 {
     // make sure the user [puser_kuser + kuser] exists according to addUserOnDemand
     // TODO - remove dead code
     //$create_user_on_demand = $this->addUserOnDemand();
     $create_user_on_demand = $this->addUserOnDemand2();
     $create_user = false;
     if ($puser_kuser == null) {
         if ($create_user_on_demand == self::CREATE_USER_FALSE) {
             $create_user = false;
         } elseif ($create_user_on_demand == self::CREATE_USER_FORCE) {
             $create_user = true;
         } elseif ($create_user_on_demand == self::CREATE_USER_FROM_PARTNER_SETTINGS) {
             $partner = PartnerPeer::retrieveByPK($partner_id);
             $create_user = $partner->getCreateUserOnDemand();
         }
     }
     if ($create_user) {
         // prefer the user_screenName on user_name
         $user_name = $this->getP("user_screenName", $this->getP("user_name"));
         if (!$user_name) {
             $puser_name = $kuser_name = myPartnerUtils::getPrefix($partner_id) . $puser_id;
         } else {
             $puser_name = $kuser_name = $user_name;
         }
         $puser_kuser = PuserKuserPeer::createPuserKuser($partner_id, $subp_id, $puser_id, $kuser_name, $puser_name, false, $kuser);
     }
     return $puser_kuser;
 }
开发者ID:kubrickfr,项目名称:server,代码行数:29,代码来源:defPartnerservices2Action.class.php

示例2: getLoggedInUserId

 protected function getLoggedInUserId()
 {
     if ($this->partner_id) {
         // this part overhere should be in a more generic place - part of the services
         $ks = "";
         // TODO - for now ignore the session
         $valid = true;
         // ( 0 >= kSessionUtils::validateKSession ( $this->partner_id , $this->uid , $this->ks_str ,&$ks ) );
         if ($valid) {
             $puser_id = $this->uid;
             // actually the better user indicator will be placed in the ks - TODO - use it !!
             // $puser_id = $ks->user;
             $kuser_name = $puser_name = $this->getP("user_name");
             if (!$puser_name) {
                 $kuser_name = myPartnerUtils::getPrefix($this->partner_id) . $puser_id;
             }
             // will return the existing one if any, will create is none
             $puser_kuser = PuserKuserPeer::createPuserKuser($this->partner_id, $this->subp_id, $puser_id, $kuser_name, $puser_name, false);
             $likuser_id = $puser_kuser->getKuserId();
             // from now on  - this will be considered the logged in user
             return $likuser_id;
         }
     } else {
         return parent::getLoggedInUserId();
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:26,代码来源:defKeditorservicesAction.class.php


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