Commit 1b05ef45 by 冷斌

fix bug

parent 11b75ae1
...@@ -171,12 +171,14 @@ class PassportAction extends CommonAction ...@@ -171,12 +171,14 @@ class PassportAction extends CommonAction
$status = 1; $status = 1;
$info = $this->passport->getSuccess(); $info = $this->passport->getSuccess();
//$data = ($GLOBALS['ts']['site']['home_url'])?$GLOBALS['ts']['site']['home_url']:0; //$data = ($GLOBALS['ts']['site']['home_url'])?$GLOBALS['ts']['site']['home_url']:0;
$open = ['type' => 1, 'uid' => $result['uid']]; if (!$openid) {
if (M('user_openid')->where($open)->find()) { $open = ['type' => 1, 'uid' => $result['uid']];
M('user_openid')->where($open)->delete(); if (M('user_openid')->where($open)->find()) {
M('user_openid')->where($open)->delete();
}
$open['open_id'] = $openid;
M('user_openid')->add($open);
} }
$open['open_id'] = $openid;
M('user_openid')->add($open);
$data = U('classroom/Index/index'); $data = U('classroom/Index/index');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment