本文整理匯總了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);
}/*}}}*/
示例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");
}
}/*}}}*/