|
|
@@ -77,8 +77,12 @@ class Comment extends Base
|
|
|
else{
|
|
|
$param['comment_name'] = cookie('user_name');
|
|
|
$param['user_id'] = intval(cookie('user_id'));
|
|
|
+ $user_data = model('User')->field('user_nick_name')->where(['user_id' => $param['user_id']])->find();
|
|
|
+ if (!empty($user_data['user_nick_name'])) {
|
|
|
+ $param['comment_name'] = $user_data['user_nick_name'];
|
|
|
+ }
|
|
|
}
|
|
|
- $param['comment_name'] = htmlentities($param['comment_name']);
|
|
|
+ $param['comment_name'] = htmlentities(trim($param['comment_name']));
|
|
|
$param['comment_rid'] = intval($param['comment_rid']);
|
|
|
$param['comment_pid'] = intval($param['comment_pid']);
|
|
|
if($GLOBALS['config']['comment']['audit'] ==1){
|