马上注册,免费下载更多dz插件网资源。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
此函数,提供一个参数,内容为用户的字段名,即可返回出来他值的内容
如:我要获取用户
威望::getuserprofile('extcredits1')
金钱: getuserprofile('extcredits2')
贡献:getuserprofile('extcredits3')
用户uid:getuserprofile(uid')
听从:getuserprofile('follower ')
收听:getuserprofile('following ')
主题: getuserprofile('threads')
函数定义:function_core.php
函数参数:
field:资料段名称
返回值:存在返回资料内容反正返回null- function getuserprofile($field) { global $_G; if(isset($_G['member'][$field])) { return $_G['member'][$field]; } static $tablefields = array( 'count' => array('extcredits1','extcredits2','extcredits3','extcredits4','extcredits5','extcredits6','extcredits7','extcredits8','friends','posts','threads','digestposts','doings','blogs','albums','sharings','attachsize','views','oltime','todayattachs','todayattachsize', 'follower', 'following', 'newfollower', 'blacklist'), 'status' => array('regip','lastip','lastvisit','lastactivity','lastpost','lastsendmail','invisible','buyercredit','sellercredit','favtimes','sharetimes','profileprogress'), 'field_forum' => array('publishfeed','customshow','customstatus','medals','sightml','groupterms','authstr','groups','attentiongroup'), 'field_home' => array('videophoto','spacename','spacedescription','domain','addsize','addfriend','menunum','theme','spacecss','blockposition','recentnote','spacenote','privacy','feedfriend','acceptemail','magicgift','stickblogs'), 'profile' => array('realname','gender','birthyear','birthmonth','birthday','constellation','zodiac','telephone','mobile','idcardtype','idcard','address','zipcode','nationality','birthprovince','birthcity','resideprovince','residecity','residedist','residecommunity','residesuite','graduateschool','company','education','occupation','position','revenue','affectivestatus','lookingfor','bloodtype','height','weight','alipay','icq','qq','yahoo','msn','taobao','site','bio','interest','field1','field2','field3','field4','field5','field6','field7','field8'), 'verify' => array('verify1', 'verify2', 'verify3', 'verify4', 'verify5', 'verify6', 'verify7'), ); $profiletable = ''; foreach($tablefields as $table => $fields) { if(in_array($field, $fields)) { $profiletable = $table; break; } } if($profiletable) { if(is_array($_G['member']) && $_G['member']['uid']) { space_merge($_G['member'], $profiletable); } else { foreach($tablefields[$profiletable] as $k) { $_G['member'][$k] = ''; } } return $_G['member'][$field]; } return null;}
复制代码
©DZ插件网所发布的一切资源仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。 网站部分内容来源于网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,得到更好的正版服务。 您在本站任何的赞助购买、下载、查阅、回复等行为等均表示接受并同意签订《DZ插件网免责声明协议》。 如有侵权请邮件与我们联系处理: discuzaddons@vip.qq.com 并出示相关证明以便删除。敬请谅解!
|
|