本文整理汇总了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");
}
}/*}}}*/