|
@@ -47,7 +47,7 @@ class UserSubscribe
|
|
|
|
|
|
$wechatInfo['nickname'] = filter_emoji($wechatInfo['nickname']);
|
|
|
Cookie::set('is_login', 1);
|
|
|
- if (isset($wechatInfo['unionid']) && $wechatInfo['unionid'] != '' && ($uid = WechatUser::where('unionid', $wechatInfo['unionid'])->where('user_type', '<>', 'h5')->value('uid'))) {
|
|
|
+ if (isset($wechatInfo['unionid']) && $wechatInfo['unionid'] != '' && ($uid = WechatUser::where('unionid', $wechatInfo['unionid'])->value('uid'))) {
|
|
|
WechatUser::edit($wechatInfo, $uid, 'uid');
|
|
|
if (!User::be(['uid' => $uid])) {
|
|
|
$wechatInfo = WechatUser::where('uid', $uid)->find();
|
|
@@ -56,7 +56,7 @@ class UserSubscribe
|
|
|
if ($login_type) $wechatInfo['login_type'] = $login_type;
|
|
|
User::updateWechatUser($wechatInfo, $uid);
|
|
|
}
|
|
|
- } else if ($uid = WechatUser::where(['openid' => $wechatInfo['openid']])->where('user_type', '<>', 'h5')->value('uid')) {
|
|
|
+ } else if ($uid = WechatUser::where(['openid' => $wechatInfo['openid']])->value('uid')) {
|
|
|
WechatUser::edit($wechatInfo, $uid, 'uid');
|
|
|
if ($login_type) $wechatInfo['login_type'] = $login_type;
|
|
|
User::updateWechatUser($wechatInfo, $uid);
|