fetch('connect', true); $sql = <<fetch($connect['guest_groupid']); if ($group) { $needCreateGroup = false; } } else { $connect = array ( 'allow' => '1', 'feed' => array ( 'allow' => '1', 'group' => '0', ), 't' => array ( 'allow' => '1', 'group' => '0', 'reply' => 1, 'reply_showauthor' => 1, ), 'like_allow' => '1', 'like_qq' => '', 'turl_allow' => '1', 'turl_qq' => '', 'like_url' => '', 'register_birthday' => '0', 'register_gender' => '0', 'register_uinlimit' => '', 'register_rewardcredit' => '1', 'register_addcredit' => '', 'register_groupid' => '0', 'register_regverify' => '1', 'register_invite' => '0', 'newbiespan' => '', 'turl_code' => '', 'mblog_app_key' => 'abc', ); } if ($needCreateGroup) { include DISCUZ_ROOT . 'source/language/lang_admincp_cloud.php'; $name = $extend_lang['connect_guest_group_name']; $userGroupData = array( 'type' => 'special', 'grouptitle' => $name, 'allowvisit' => 1, 'color' => '', 'stars' => '', ); $newGroupId = C::t('common_usergroup')->insert($userGroupData, true); $dataField = array( 'groupid' => $newGroupId, 'allowsearch' => 2, 'readaccess' => 1, 'allowgetattach' => 1, 'allowgetimage' => 1, ); C::t('common_usergroup_field')->insert($dataField); $connect['guest_groupid'] = $newGroupId; updatecache('usergroups'); } $https = json_decode(dfsockopen('https://graph.qq.com/user/get_user_info')); $connect['oauth2'] = $https->ret == -1 ? 1 : 0; C::t('common_setting')->update('connect', serialize($connect)); updatecache('setting'); $finish = true;