本文整理汇总了PHP中getuserprofile函数的典型用法代码示例。如果您正苦于以下问题:PHP getuserprofile函数的具体用法?PHP getuserprofile怎么用?PHP getuserprofile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getuserprofile函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: connectUserBindParams
public function connectUserBindParams()
{
global $_G;
$this->connectMergeMember();
getuserprofile('birthyear');
getuserprofile('birthmonth');
getuserprofile('birthday');
switch ($_G['member']['gender']) {
case 1:
$sex = 'male';
break;
case 2:
$sex = 'female';
break;
default:
$sex = 'unknown';
}
$is_public_email = 2;
$is_use_qq_avatar = $_G['member']['conisqzoneavatar'] == 1 ? 1 : 2;
$birthday = sprintf('%04d', $_G['member']['birthyear']) . '-' . sprintf('%02d', $_G['member']['birthmonth']) . '-' . sprintf('%02d', $_G['member']['birthday']);
$agent = md5(time() . rand() . uniqid());
$inputArray = array('uid' => $_G['uid'], 'agent' => $agent, 'time' => TIMESTAMP);
require_once DISCUZ_ROOT . './config/config_ucenter.php';
$input = 'uid=' . $_G['uid'] . '&agent=' . $agent . '&time=' . TIMESTAMP;
$avatar_input = authcode($input, 'ENCODE', UC_KEY);
$params = array('oauth_consumer_key' => $_G['setting']['connectappid'], 'u_id' => $_G['uid'], 'username' => $_G['member']['username'], 'email' => $_G['member']['email'], 'birthday' => $birthday, 'sex' => $sex, 'is_public_email' => $is_public_email, 'is_use_qq_avatar' => $is_use_qq_avatar, 's_id' => null, 'avatar_input' => $avatar_input, 'avatar_agent' => $agent, 'site_ucenter_id' => UC_APPID, 'source' => 'qzone');
return $params;
}
示例2: setloginstatus
function setloginstatus($member, $cookietime)
{
global $_G;
$_G['uid'] = $member['uid'];
$_G['username'] = addslashes($member['username']);
$_G['adminid'] = $member['adminid'];
$_G['groupid'] = $member['groupid'];
$_G['formhash'] = formhash();
$_G['session']['invisible'] = getuserprofile('invisible');
$_G['member'] = $member;
loadcache('usergroup_' . $_G['groupid']);
$discuz =& discuz_core::instance();
$discuz->session->isnew = true;
dsetcookie('auth', authcode("{$member['password']}\t{$member['uid']}", 'ENCODE'), $cookietime, 1, true);
dsetcookie('loginuser');
dsetcookie('activationauth');
dsetcookie('pmnum');
include_once libfile('function/stat');
updatestat('login', 1);
if (defined('IN_MOBILE')) {
updatestat('mobilelogin', 1);
}
if ($_G['setting']['connect']['allow'] && $_G['member']['conisbind']) {
updatestat('connectlogin', 1);
}
updatecreditbyaction('daylogin', $_G['uid']);
checkusergroup($_G['uid']);
}
示例3: common
function common()
{
global $_G;
$seccodecheck = $secqaacheck = false;
if ($_GET['type'] == 'register') {
$seccodecheck = $_G['setting']['seccodestatus'] & 1;
$secqaacheck = $_G['setting']['secqaa']['status'] & 1;
} elseif ($_GET['type'] == 'login') {
$seccodecheck = $_G['setting']['seccodestatus'] & 2;
} elseif ($_GET['type'] == 'post') {
$seccodecheck = $_G['setting']['seccodestatus'] & 4 && (!$_G['setting']['seccodedata']['minposts'] || getuserprofile('posts') < $_G['setting']['seccodedata']['minposts']);
$secqaacheck = $_G['setting']['secqaa']['status'] & 2 && (!$_G['setting']['secqaa']['minposts'] || getuserprofile('posts') < $_G['setting']['secqaa']['minposts']);
}
$sechash = random(8);
if ($seccodecheck || $secqaacheck) {
$variable = array('sechash' => $sechash);
if ($seccodecheck) {
$variable['seccode'] = $_G['siteurl'] . 'api/mobile/index.php?module=seccode&sechash=' . $sechash . '&version=' . (empty($_GET['secversion']) ? '1' : $_GET['secversion']);
}
if ($secqaacheck) {
require_once libfile('function/seccode');
$variable['secqaa'] = make_secqaa($sechash);
}
}
mobile_core::result(mobile_core::variable($variable));
}
示例4: generateSiteSignUrl
public function generateSiteSignUrl($params = array())
{
global $_G;
$utilService = Cloud::loadClass('Service_Util');
@(include_once DISCUZ_ROOT . './source/discuz_version.php');
if (!isset($_G['member']['conopenid'])) {
$member_connect = $_G['uid'] ? C::t('#qqconnect#common_member_connect')->fetch($_G['uid']) : array();
$_G['member'] = array_merge($_G['member'], $member_connect);
}
$ts = TIMESTAMP;
$sKey = $_G['setting']['my_sitekey'];
$params['clientIp'] = $_G['clientip'];
$params['uid'] = $_G['uid'];
$params['openId'] = getuserprofile('conopenid');
$params['sId'] = $_G['setting']['siteuniqueid'];
$params['appId'] = $_G['setting']['connectappid'];
$params['ver'] = CLOUDCAPTCHA_VER;
$params['dzVersion'] = DISCUZ_VERSION;
$params['sId'] = $_G['setting']['my_siteid'];
ksort($params);
$str = $utilService->httpBuildQuery($params, '', '&');
$sig = md5(sprintf('%s|%s|%s', $str, $sKey, $ts));
$params['ts'] = $ts;
$params['sig'] = $sig;
$params = $utilService->httpBuildQuery($params, '', '&');
return $params;
}
示例5: before_editpost
public function before_editpost($parameters)
{
$isfirstpost = $this->post['first'] ? 1 : 0;
$isorigauthor = $this->member['uid'] && $this->member['uid'] == $this->post['authorid'];
if ($isfirstpost) {
if ($this->thread['special'] == 3) {
$this->param['price'] = $isorigauthor ? $this->thread['price'] > 0 && $this->thread['price'] != $_GET['rewardprice'] ? $_GET['rewardprice'] : 0 : $this->thread['price'];
}
if ($this->thread['special'] == 3 && $isorigauthor) {
$rewardprice = intval($_GET['rewardprice']);
if ($this->thread['price'] > 0 && $this->thread['price'] != $_GET['rewardprice']) {
if ($rewardprice <= 0) {
showmessage('reward_credits_invalid');
}
$addprice = ceil($rewardprice - $this->thread['price'] + ($rewardprice - $this->thread['price']) * $this->setting['creditstax']);
if ($rewardprice < $this->thread['price']) {
showmessage('reward_credits_fall');
} elseif ($rewardprice < $this->group['minrewardprice'] || $this->group['maxrewardprice'] > 0 && $rewardprice > $this->group['maxrewardprice']) {
showmessage('reward_credits_between', '', array('minrewardprice' => $this->group['minrewardprice'], 'maxrewardprice' => $this->group['maxrewardprice']));
} elseif ($addprice > getuserprofile('extcredits' . $this->setting['creditstransextra'][2])) {
showmessage('reward_credits_shortage');
}
$realprice = ceil($this->thread['price'] + $this->thread['price'] * $this->setting['creditstax']);
updatemembercount($this->thread['authorid'], array($this->setting['creditstransextra'][2] => -$addprice));
C::t('common_credit_log')->update_by_uid_operation_relatedid($this->thread['authorid'], 'RTC', $this->thread['tid'], array('extcredits' . $this->setting['creditstransextra'][2] => $realprice));
}
if (!$this->forum['ismoderator']) {
if ($this->thread['replies'] > 1) {
$this->param['subject'] = addslashes($this->thread['subject']);
}
}
$this->param['price'] = $rewardprice;
}
}
}
示例6: updatemembercount
function updatemembercount($creditarr, $uids = 0, $checkgroup = true, $ruletxt = '')
{
global $_G;
if (!$uids) {
$uids = intval($_G['uid']);
}
$uids = is_array($uids) ? $uids : array($uids);
if ($uids && ($creditarr || $this->extrasql)) {
if ($this->extrasql) {
$creditarr = array_merge($creditarr, $this->extrasql);
}
$sql = array();
$allowkey = array('extcredits1', 'extcredits2', 'extcredits3', 'extcredits4', 'extcredits5', 'extcredits6', 'extcredits7', 'extcredits8', 'friends', 'posts', 'threads', 'oltime', 'digestposts', 'doings', 'blogs', 'albums', 'sharings', 'attachsize', 'views', 'todayattachs', 'todayattachsize');
$creditnotice = $_G['setting']['creditnotice'] && $_G['uid'] && $uids == array($_G['uid']);
if ($creditnotice) {
if (!isset($_G['cookiecredits'])) {
$_G['cookiecredits'] = !empty($_COOKIE['creditnotice']) ? explode('D', $_COOKIE['creditnotice']) : array_fill(0, 9, 0);
for ($i = 1; $i <= 8; $i++) {
$_G['cookiecreditsbase'][$i] = getuserprofile('extcredits' . $i);
}
}
if ($ruletxt) {
$_G['cookiecreditsrule'][$ruletxt] = $ruletxt;
}
}
//$critarr 各项积分参数extcredit设置的值
$settingValue = WebUtils::getDzPluginAppbymeAppConfig('dzsyscache_forum_extcredit_base');
foreach ($creditarr as $key => $value) {
$mutilute = 1;
foreach ($settingValue as $k => $v) {
if ($key == 'extcredits' . $k) {
$mutilute = $v * 0.01;
}
}
if (!empty($key) && $value && in_array($key, $allowkey)) {
$sql[$key] = $value * $mutilute;
if ($creditnotice && substr($key, 0, 10) == 'extcredits') {
$i = substr($key, 10);
$_G['cookiecredits'][$i] += $value * $mutilute;
}
}
}
if ($creditnotice) {
dsetcookie('creditnotice', implode('D', $_G['cookiecredits']) . 'D' . $_G['uid']);
dsetcookie('creditbase', '0D' . implode('D', $_G['cookiecreditsbase']));
if (!empty($_G['cookiecreditsrule'])) {
dsetcookie('creditrule', strip_tags(implode("\t", $_G['cookiecreditsrule'])));
}
}
//var_dump($sql);die;
if ($sql) {
C::t('common_member_count')->increase($uids, $sql);
}
if ($checkgroup && count($uids) == 1) {
$this->checkusergroup($uids[0]);
}
$this->extrasql = array();
}
}
示例7: csc
function csc($task = array())
{
global $_G;
if (getuserprofile('friends') >= 5) {
return true;
}
return array('csc' => 0, 'remaintime' => 0);
}
示例8: output
function output()
{
global $_G;
$data = $GLOBALS['space'];
$data['groupiconid'] = mobile_core::usergroupIconId($data['groupid']);
if ($data['group']['type'] == 'member' && $data['group']['groupcreditslower'] != 999999999) {
$data['upgradecredit'] = $data['group']['creditslower'] - $data['credits'];
$data['upgradeprogress'] = 100 - ceil($data['upgradecredit'] / ($data['group']['creditslower'] - $data['group']['creditshigher']) * 100);
$data['upgradeprogress'] = max($data['upgradeprogress'], 2);
}
unset($data['password'], $data['email'], $data['regip'], $data['lastip'], $data['regip_loc'], $data['lastip_loc']);
$variable = array('space' => $data, 'extcredits' => $_G['setting']['extcredits'], 'wsq' => array('wsq_apicredit' => getuserprofile('extcredits' . $_G['wechat']['setting']['wsq_apicredit'])));
mobile_core::result(mobile_core::variable($variable));
}
示例9: setloginstatus
function setloginstatus($member, $cookietime)
{
global $_G;
$_G['uid'] = $member['uid'];
$_G['username'] = $member['username'];
$_G['adminid'] = $member['adminid'];
$_G['groupid'] = $member['groupid'];
$_G['formhash'] = formhash();
$_G['session']['invisible'] = getuserprofile('invisible');
$_G['member'] = $member;
$_G['core']->session->isnew = 1;
dsetcookie('auth', authcode("{$member['password']}\t{$member['uid']}", 'ENCODE'), $cookietime, 1, true);
dsetcookie('loginuser');
dsetcookie('activationauth');
dsetcookie('pmnum');
}
示例10: setloginstatus
function setloginstatus($member, $cookietime)
{
global $_G;
foreach ($_G['cookie'] as $k => $v) {
dsetcookie($k);
}
$_G['uid'] = $member['uid'];
$_G['username'] = addslashes($member['username']);
$_G['adminid'] = $member['adminid'];
$_G['groupid'] = $member['groupid'];
$_G['formhash'] = formhash();
$_G['session']['invisible'] = getuserprofile('invisible');
$_G['member'] = $member;
$discuz =& discuz_core::instance();
$discuz->session->isnew = true;
dsetcookie('auth', authcode("{$member['password']}\t{$member['uid']}", 'ENCODE'), $cookietime, 1, true);
dsetcookie('loginuser');
dsetcookie('activationauth');
dsetcookie('pmnum');
}
示例11: get_menu_foot
function get_menu_foot($brandresult)
{
global $_G;
$bid = $brandresult['bid'];
$tid = $brandresult['tid'];
$perpage = 5;
$page = intval($_G[sr_page]);
$page = max(1, intval($page));
$start = ($page - 1) * $perpage;
$start = max(0, $start);
require_once libfile('function/discuzcode');
$count = C::t('#sanree_brand#forum_post')->count_by_tid_post(0, $tid);
if ($count > 0) {
$postthread = C::t('#sanree_brand#forum_post')->fetch_all_by_tid(0, $tid, true, ' desc', ($page - 1) * $perpage, $perpage, 0, 0);
foreach ($postthread as $key => $val) {
$postthread[$key]['message'] = discuzcode($val['message'], 0, 0, 0, 1);
$postthread[$key]['satisfaction'] = C::t('#sanree_brand#sanree_brand_voterlog')->getstar_by_tid_uid($val['authorid'], $tid) * 20;
$postthread[$key]['dateline'] = dgmdate($val['dateline']);
$postthread[$key]['img'] = avatar($val['authorid'], 'middle', 1);
}
$murl = $_G['item_detail'] == 'item' ? $is_rewrite ? getburl($brandresult) . '?t' . $extra : getburl($brandresult) . $extra : ($is_rewrite ? getdetailurl($brandresult) . '?t' . $extra : getdetailurl($brandresult) . $extra);
$multi = multi($count, $perpage, $page, $murl);
}
$satisfaction = C::t('#sanree_brand#sanree_brand_voterlog')->getstar_by_tid_uid($_G['uid'], $tid) * 20;
$seditor = array('fastpost', array('bold', 'color', 'link', 'quote', 'smilies'));
$selfimg = avatar($_G['uid'], 'middle', 1);
$wx_prefix = $_G['setting']['attachurl'] . 'category/';
$appVer = $_G['setting']['version'];
$dzv = array('X3.2', 'X3.1');
if (in_array($appVer, $dzv)) {
list($seccodecheck) = seccheck('publish');
$dzvflag = true;
$sectpl = '<div class="rfm"><table><tr><th><sec>: </th><td><span id="sec<hash>" onclick="showMenu({\'ctrlid\':\'sec<hash>\',\'pos\':\'*\'})"><sec></span><br /><div id="sec<hash>_menu" class="p_pop p_opt" style="display:none"><sec></div></td></tr></table></div>';
} else {
$seccodecheck = $_G['setting']['seccodestatus'] & 4 && (!$_G['setting']['seccodedata']['minposts'] || getuserprofile('posts') < $_G['setting']['seccodedata']['minposts']);
$secqaacheck = $_G['setting']['secqaa']['status'] & 2 && (!$_G['setting']['secqaa']['minposts'] || getuserprofile('posts') < $_G['setting']['secqaa']['minposts']);
$dzvflag = false;
}
include templateEx($this->_identifier . ':' . $this->_template . '/srfoot');
$GLOBALS['srfoot'] = $srfoot;
}
示例12: common
function common()
{
global $_G;
if (!$_G['uid'] || !in_array('wechat', $_G['setting']['plugins']['available'])) {
mobile_core::result(mobile_core::variable(array()));
}
$_G['wechat']['setting'] = unserialize($_G['setting']['mobilewechat']);
if (!$_G['wechat']['setting']['wsq_apicredit']) {
mobile_core::result(mobile_core::variable(array()));
}
$extcredit = 'extcredits' . $_G['wechat']['setting']['wsq_apicredit'];
$ac = $_GET['ac'];
$return = array();
if (submitcheck('creditsubmit') && ($ac == 'inc' || $ac == 'dec') && $_GET['value'] > 0) {
$v = $ac == 'inc' ? $_GET['value'] : -$_GET['value'];
$log = lang('plugin/wechat', 'wsq_apicredit_log_' . $ac);
updatemembercount(array($_G['uid']), array($extcredit => $v), true, '', 0, '', $log);
$data = C::t('common_member_count')->fetch($_G['uid']);
$return['extcredit'] = $data[$extcredit];
} elseif ($ac == 'get') {
$return['extcredit'] = getuserprofile($extcredit);
}
mobile_core::result(mobile_core::variable($return));
}
示例13: libfile
if ($do != 'profile' && !ckprivacy($do, 'view')) {
$_G['privacy'] = 1;
require_once libfile('space/profile', 'include');
include template('home/space_privacy');
exit;
}
$widths = getlayout($userdiy['currentlayout']);
$leftlist = formatdata($userdiy, 'left', $space);
$centerlist = formatdata($userdiy, 'center', $space);
$rightlist = formatdata($userdiy, 'right', $space);
dsetcookie('home_diymode', 1);
}
$navtitle = !empty($space['spacename']) ? $space['spacename'] : lang('space', 'sb_space', array('who' => $space['username']));
$metakeywords = lang('space', 'sb_space', array('who' => $space['username']));
$metadescription = lang('space', 'sb_space', array('who' => $space['username']));
$space['medals'] = getuserprofile('medals');
if ($space['medals']) {
loadcache('medals');
foreach ($space['medals'] = explode("\t", $space['medals']) as $key => $medalid) {
list($medalid, $medalexpiration) = explode("|", $medalid);
if (isset($_G['cache']['medals'][$medalid]) && (!$medalexpiration || $medalexpiration > TIMESTAMP)) {
$space['medals'][$key] = $_G['cache']['medals'][$medalid];
} else {
unset($space['medals'][$key]);
}
}
}
include_once template('home/space_index');
function formatdata($data, $position, $space)
{
$list = array();
示例14: forumperm
$_G['group']['allowpostimage'] = $_G['forum']['allowpostimage'] != -1 && ($_G['forum']['allowpostimage'] == 1 || !$_G['forum']['postimageperm'] && $_G['group']['allowpostimage'] || $_G['forum']['postimageperm'] && forumperm($_G['forum']['postimageperm']));
$_G['group']['attachextensions'] = $_G['forum']['attachextensions'] ? $_G['forum']['attachextensions'] : $_G['group']['attachextensions'];
require_once libfile('function/upload');
$swfconfig = getuploadconfig($_G['uid'], $_G['fid']);
$imgexts = str_replace(array(';', '*.'), array(', ', ''), $swfconfig['imageexts']['ext']);
$allowuploadnum = $allowuploadtoday = TRUE;
if ($_G['group']['allowpostattach'] || $_G['group']['allowpostimage']) {
if ($_G['group']['maxattachnum']) {
$allowuploadnum = $_G['group']['maxattachnum'] - getuserprofile('todayattachs');
$allowuploadnum = $allowuploadnum < 0 ? 0 : $allowuploadnum;
if (!$allowuploadnum) {
$allowuploadtoday = false;
}
}
if ($_G['group']['maxsizeperday']) {
$allowuploadsize = $_G['group']['maxsizeperday'] - getuserprofile('todayattachsize');
$allowuploadsize = $allowuploadsize < 0 ? 0 : $allowuploadsize;
if (!$allowuploadsize) {
$allowuploadtoday = false;
}
$allowuploadsize = $allowuploadsize / 1048576 >= 1 ? round($allowuploadsize / 1048576, 1) . 'MB' : round($allowuploadsize / 1024) . 'KB';
}
}
$allowpostimg = $_G['group']['allowpostimage'] && $imgexts;
$enctype = $_G['group']['allowpostattach'] || $_G['group']['allowpostimage'] ? 'enctype="multipart/form-data"' : '';
$maxattachsize_mb = $_G['group']['maxattachsize'] / 1048576 >= 1 ? round($_G['group']['maxattachsize'] / 1048576, 1) . 'MB' : round($_G['group']['maxattachsize'] / 1024) . 'KB';
$_G['group']['maxprice'] = isset($_G['setting']['extcredits'][$_G['setting']['creditstrans']]) ? $_G['group']['maxprice'] : 0;
$extra = !empty($_GET['extra']) ? rawurlencode($_GET['extra']) : '';
$notifycheck = empty($emailnotify) ? '' : 'checked="checked"';
$stickcheck = empty($sticktopic) ? '' : 'checked="checked"';
$digestcheck = empty($addtodigest) ? '' : 'checked="checked"';
示例15: protectguard
function protectguard($protect)
{
global $_G, $member_verifys;
if (!isset($member_verifys) && $_G['setting']['verify']['enabled']) {
$member_verifys = array();
getuserprofile('verify1');
foreach ($_G['setting']['verify'] as $vid => $verify) {
if ($verify['available'] && $_G['member']['verify' . $vid] == 1) {
$member_verifys[] = $vid;
}
}
}
$verifyflag = 0;
if ($_G['setting']['verify']['enabled'] && $protect['verify']) {
if (array_intersect(explode("\t", $protect['verify']), $member_verifys)) {
$verifyflag = 1;
}
}
if ($protect['usergroup'] && strstr("\t" . $protect['usergroup'] . "\t", "\t{$_G['groupid']}\t") || empty($protect['usergroup']) && empty($protect['verify']) || $verifyflag || $_G['forum_thread']['authorid'] == $_G['uid']) {
return false;
} else {
return true;
}
}