phpcms会员登录后显示会员名称是带括号的,现在把他修改成不带括号。
找到函数库libs/functions/global.func.php,修改如下即可:
function get_nickname($userid='', $field='') { $return = ''; if(is_numeric($userid)) { $member_db = pc_base::load_model('member_model'); $memberinfo = $member_db->get_one(array('userid'=>$userid)); if(!empty($field) && $field != 'nickname' && isset($memberinfo[$field]) &&!empty($memberinfo[$field])) { $return = $memberinfo[$field]; } else { $return = isset($memberinfo['nickname']) && !empty($memberinfo['nickname']) ? $memberinfo['nickname'].'('.$memberinfo['username'].')' : $memberinfo['username']; } } else { if (param::get_cookie('_nickname')) { //$return .= '('.param::get_cookie('_nickname').')'; //修改昵称不带括号 $return .= param::get_cookie('_nickname'); } else { //$return .= '('.param::get_cookie('_username').')';//修改昵称不带括号 $return .= param::get_cookie('_username'); } } return $return; }