當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UserClient::clearSeed方法代碼示例

本文整理匯總了PHP中UserClient::clearSeed方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserClient::clearSeed方法的具體用法?PHP UserClient::clearSeed怎麽用?PHP UserClient::clearSeed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UserClient的用法示例。


在下文中一共展示了UserClient::clearSeed方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: weixinSetRedirect

 public function weixinSetRedirect($request, $response)
 {/*{{{*/
     UserClient::clearSeed();
     $openid = $request->openid;
     $weixUser = DAL::get()->find_by_openid_and_weixintype("WeixUser", $openid, WeixUser::WEIXINTYPE_PATIENT, true);
     $spaceId = $request->spaceId;
     $userId = $weixUser->userId;
     setcookie("WeixUserId", $weixUser->id, time()+3600*24*365*20, "/", "haodf.com");
     if($userId != 0)
     {
         UserClient::getInstance()->login4Weix($weixUser->userId);
         setcookie("WeixUserId", $weixUser->id, time()+3600*24*365*20, "/", "haodf.com");
         $patientSignin = DAL::get()->find_by_ForWeiXinSignin('PatientSignin', $spaceId, 0, $userId);
     }
     else
     {
         $patientSignin = new NullEntity();
     }
     if($patientSignin->isNull())
     {
         if($weixUser->userId != 0)
         {
             $url = $response->router->urlfor('weixin/checkpatient',  array('userid'=>$weixUser->userId, 'spaceid'=>$spaceId, 'patientName'=>$request->patientName, 'disease'=>$request->disease));
         }
         else
         {
             $url = $response->router->urlfor('weixin/reportinfo',  array('wxUserId'=>$weixUser->id, 'spaceid'=>$spaceId));
         }
     }
     else
     {
         $patientId = $patientSignin->patient->id;
         $attachmentIds = $patientSignin->attachmentIds;
         $hasPatientSigninContent = (false == empty($attachmentIds)) || ('' != trim($patientSignin->treatment));
         if($hasPatientSigninContent)
         {
             $url = $response->router->urlfor('weixin/wxflowdetail',  array('patientid'=>$patientId, 'spaceid'=>$spaceId));
         }
         else
         {
             $url = $response->router->urlfor('attach/weixinconfirmattach',  array('patientId'=>$patientId, 'spaceId'=>$spaceId));
         }
     }
     $response->setRedirect($url);
 }/*}}}*/
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:45,代碼來源:weixincontroller.php

示例2: auth

 public function auth($request, $response)
 {/*{{{*/
     UserClient::clearSeed();
     $code = $request->code;
     $openid = WeixApi::getOpenIdByCode($code, WeixUser::WEIXINTYPE_PATIENT);
     $weixUser = DAL::get()->find_by_openid_and_weixintype('WeixUser', $openid, WeixUser::WEIXINTYPE_PATIENT);
     setcookie("WeixUserId", $weixUser->id, time()+3600*24*365*20, "/", "haodf.com");
     $type = $request->type;
     if($weixUser->userId != 0)
     {
         $user = UserClient::getInstance()->login4Weix($weixUser->userId);
     }
     if($type == 1)
     {
         $response->setRedirect("http://" . URL_PREFIX . "m.haodf.com/touch/weixin/beforesignin?openid=$openid");
     }
     else
     {
         $response->setRedirect("http://" . URL_PREFIX . "m.haodf.com/touch/weixin/mydoctor?userid=$weixUser->userId&openid=$openid");
     }
 }/*}}}*/
開發者ID:sdgdsffdsfff,項目名稱:hdf-client,代碼行數:21,代碼來源:wxcontroller.php


注:本文中的UserClient::clearSeed方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。