|
//新用户发言
function cknewuser($return=0) {
global $_G;
$result = true;
if(!$_G['uid']) return true;
if(checkperm('disablepostctrl')) {
return $result;
}
$ckuser = $_G['member'];
if($_G['setting']['newbiespan'] && $_G['timestamp']-$ckuser['regdate']<$_G['setting']['newbiespan']*60) {
if(empty($return)) showmessage('no_privilege_newbiespan', '', array('newbiespan' => $_G['setting']['newbiespan']), array());
$result = false;
}
if($_G['setting']['need_avatar'] && empty($ckuser['avatarstatus'])) {
if(empty($return)) showmessage('no_privilege_avatar', '', array(), array());
$result = false;
}
if($_G['setting']['need_email'] && empty($ckuser['emailstatus'])) {
if(empty($return)) showmessage('no_privilege_email', '', array(), array());
$result = false;
}
if($_G['setting']['need_friendnum']) {
space_merge($ckuser, 'count');
if($ckuser['friends'] < $_G['setting']['need_friendnum']) {
if(empty($return)) showmessage('no_privilege_friendnum', '', array('friendnum' => $_G['setting']['need_friendnum']), array());
$result = false;
}
}
return $result;
}
|
|