function output() { global $_G; parse_str($_G['messageparam'][1], $p); $variable = array('auth' => $p['auth']); if ($_G['uid']) { require_once DISCUZ_ROOT . './source/plugin/wechat/wsq.class.php'; if (method_exists('wsq', 'userloginUrl')) { $_source = isset($_GET['_source']) ? $_GET['_source'] : ''; if (!$_source && !empty($_GET['openid']) && !empty($_GET['openidsign'])) { $variable['loginUrl'] = wsq::userloginUrl($_G['uid'], $_GET['openid'], $_GET['openidsign']); if (!C::t('#wechat#common_member_wechatmp')->fetch($_G['uid'])) { C::t('#wechat#common_member_wechatmp')->insert(array('uid' => $_G['uid'], 'openid' => $_GET['openid'], 'status' => 1), false, true); } } else { $variable['loginUrl'] = wsq::userloginUrl2($_G['uid']); } } } mobile_core::result(mobile_core::variable($variable)); }
if (!$member['conisbind']) { C::t('#qqconnect#common_member_connect')->delete($connect_member['uid']); unset($connect_member); } else { $connect_member['conisbind'] = $member['conisbind']; } } else { C::t('#qqconnect#common_member_connect')->delete($connect_member['uid']); unset($connect_member); } $connect_is_unbind = $params['is_unbind'] == 1 ? 1 : 0; require_once DISCUZ_ROOT . './source/plugin/wechat/wsq.class.php'; if (method_exists('wsq', 'userloginUrl')) { $_source = isset($refererarray['_source']) ? $refererarray['_source'] : ''; if (!$_source && !empty($refererarray['openid']) && !empty($refererarray['openidsign'])) { $loginUrl = wsq::userloginUrl($connect_member['uid'], $refererarray['openid'], $refererarray['openidsign']); if (!C::t('#wechat#common_member_wechatmp')->fetch($connect_member['uid'])) { C::t('#wechat#common_member_wechatmp')->insert(array('uid' => $connect_member['uid'], 'openid' => $refererarray['openid'], 'status' => 1), false, true); } } else { $loginUrl = wsq::userloginUrl2($_G['uid']); } $referer .= '&loginUrl=' . urlencode($loginUrl); } C::t('#qqconnect#common_member_connect')->update($connect_member['uid'], !$_G['setting']['connect']['oauth2'] ? array('conuin' => $conuin, 'conuinsecret' => $conuinsecret, 'conopenid' => $conopenid, 'conisfeed' => 1) : array('conuintoken' => $conuintoken, 'conopenid' => $conopenid, 'conisfeed' => 1)); $params['mod'] = 'login'; connect_login($connect_member); loadcache('usergroups'); $usergroups = $_G['cache']['usergroups'][$_G['groupid']]['grouptitle']; $param = array('username' => $_G['member']['username'], 'usergroup' => $_G['group']['grouptitle']); C::t('common_member_status')->update($connect_member['uid'], array('lastip' => $_G['clientip'], 'lastvisit' => TIMESTAMP, 'lastactivity' => TIMESTAMP));