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


PHP Model_Broker_AjkBrokerExtend::getBrokerInfoByUserId方法代码示例

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


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

示例1: handle_request_internal

 public function handle_request_internal()
 {
     $apf = APF::get_instance();
     $response = $apf->get_response();
     $request = APF::get_instance()->get_request();
     $params = $request->get_parameters();
     //加密公钥
     $member_key = $apf->get_config("member_key");
     //加密字符串
     $key = $params['key'];
     //用户ID
     $uid = $params['uid'];
     //用户NAME
     $username = $params['name'];
     //用户类型
     $usertype = $params['utype'];
     //$response->set_cookie("uid",$uid);
     $response->set_cookie("usertype", $usertype);
     //成功跳转页面
     $location = base64_decode(urldecode($params['location']));
     if (strpos($location, chr(13))) {
         $location = substr($location, 0, strpos($location, chr(13)));
     }
     if (strpos($location, '?') !== false) {
         $location .= '&_r=' . mt_rand(0, time());
     } else {
         $location .= '?_r=' . mt_rand(0, time());
     }
     //用户登录时间
     $time = $params['time'];
     //key的过期时间
     $keytime = $params['keytime'];
     //是否来自经纪人登陆
     $frombroker = $params['frombroker'];
     $errmsg = htmlspecialchars(urldecode($params['errmsg']));
     //错误代码
     $error = $params['error'];
     //来源
     $sid = @APF::get_instance()->get_request()->get_parameter("sid");
     //登陆成功
     if ($uid && Bll_Security_Member::check_key($key, $uid, $username, $member_key, $time, $keytime)) {
         $user = Model_Broker_Member::getAjkMembersByUserId($uid);
         if ($user->userType > 1) {
             $broker = Model_Broker_AjkBrokerExtend::getBrokerInfoByUserId($user->userId);
         }
         if ($user) {
             header("P3P: CP=CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR");
             $brokerid = 0;
             $cookietime = 86400 * 365;
             $ucity = APF::get_instance()->get_request()->getCityId();
             if ($user->userType == 2) {
                 // 自动创建三网支付中心账号
                 /*$bll_account = new BLL_Acenter_AccountUser();
                   $bll_account->create_three_account_must($uid);*/
                 if (intval($broker->checkState) == 2) {
                     // 被业务经理关闭的帐号
                     $errorMess = Const_Verify::CLOSE_ERROR;
                 }
                 if (intval($broker->accountType) == 10000) {
                     // 被业务经理冻结帐号
                     $errorMess = Const_Verify::FREEZE_ERROR;
                 }
                 if ($broker->isLogin == 0 && $broker->punish == 2) {
                     //黑名单经纪人不管是免费的还是续费的,立即关闭。
                     $errorMess = Const_Verify::BLACK_ERROR;
                 }
                 if ($errorMess) {
                     $backurl = strpos($location, '?') ? $location . '&errorMess=' . $errorMess : $location . '?errmsg=' . $errorMess;
                     Uri_Http::redirect_header($backurl, 302);
                     return;
                 }
                 $ucity = @$broker->cityId;
                 $brokerid = @$broker->brokerId;
                 $cookietime = 0;
                 $userTypeNew = Const_Verify::BROKER_USER;
             } else {
                 //查询是用户是否门店
                 $AgcyInfo = Model_Broker_AgcyAccount::getAgcyByUserId($user->userId);
                 if (is_array($AgcyInfo) && count($AgcyInfo)) {
                     $userTypeNew = Const_Verify::COMPANY_USER;
                 } else {
                     $userTypeNew = Const_Verify::COMMON_USER;
                 }
             }
             $userid = $user->userId;
             $username = $user->userName;
             $usertype = $user->userType;
             $fuid = $user->fuid;
             $emailpass = 1;
             if ($brokerid > 0) {
                 Model_Log_BrokerLogin::insertLoginLog(date('Ym'), $brokerid);
             }
             $anjuke_secques = APF::get_instance()->get_config("AnjukeSecques");
             $this->setLoginDataCookie($userid, $username, $usertype, $emailpass, $anjuke_secques, 0, $fuid, $ucity, $brokerid, $cookietime, $afutype = 0, $sid, $userTypeNew);
             $this->setLastLoinUserName($username, 86400 * 365);
         }
         //跳转用户原访问页面
         if (!$params['no_redirect']) {
             Uri_Http::redirect_header($location, 302);
         }
//.........这里部分代码省略.........
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:101,代码来源:Verify.php

示例2: getBrokerInfoByUserId

 /**
  * author hukan
  * 根据UserId获取经纪人的信息
  */
 public static function getBrokerInfoByUserId($userId)
 {
     if ($userId) {
         return Model_Broker_AjkBrokerExtend::getBrokerInfoByUserId($userId);
     } else {
         return array();
     }
 }
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:12,代码来源:User.php

示例3: handle_request

 public function handle_request()
 {
     //监控fyk_push_props表 如果有新增记录 生成推送信息推送
     $props = $this->getPushedRecommendProps();
     if (empty($props)) {
         // 更新游标
         $id = array_pop($props);
         if (!empty($id)) {
             $this->cursor['id'] = $id->id;
             $this->setFlag($this->cursor);
         }
         return;
     }
     $propIds = array();
     foreach ($props as $prop) {
         $propIds[] = $prop->propId;
     }
     //房源库房源信息
     $commIds = array();
     $keyPropInfos = array();
     $propInfos = Model_Fyk_PropLibrary::getDataById($propIds);
     if (empty($propInfos)) {
         // 更新游标
         $id = array_pop($props);
         $this->cursor['id'] = $id->id;
         $this->setFlag($this->cursor);
         return;
     }
     foreach ($propInfos as $propInfo) {
         $commIds[] = $propInfo['commId'];
         $keyPropInfos[$propInfo['id']] = $propInfo;
         // 房源id 为key 房源信息
     }
     //批量小区信息
     $commInfos = $this->getCommInfo($commIds);
     //小区id 为key  小区坐标
     foreach ($props as $prop) {
         $userId = $prop->userId;
         $brokerInfo = Model_Broker_AjkBrokerExtend::getBrokerInfoByUserId($userId);
         if (empty($brokerInfo)) {
             //更新游标
             $this->cursor['id'] = $prop->id;
             $this->setFlag($this->cursor);
             continue;
         }
         $brokerId = $brokerInfo->brokerId;
         //获取房源小区
         $commId = $keyPropInfos[$prop->propId]['commId'];
         if (empty($commId)) {
             //更新游标
             $this->cursor['id'] = $prop->id;
             $this->setFlag($this->cursor);
             continue;
         }
         $msg = $commInfos[$commId]['commName'] . '出现新房源';
         /** 消息推送 */
         $result = $this->push($brokerId, $msg);
         //更新游标
         $this->cursor['id'] = $prop->id;
         $this->setFlag($this->cursor);
     }
 }
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:62,代码来源:NewPropsPush.php


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