diff --git a/app/controller/api/User.php b/app/controller/api/User.php index 652418e..1860534 100644 --- a/app/controller/api/User.php +++ b/app/controller/api/User.php @@ -39,7 +39,7 @@ class User extends Base { $params = [ 'code' => $this->request->param('code', ''), - 'nick_name' => $this->request->param('nickName', ''), + 'nick_name' => filterEmoji($this->request->param('nickName', '')), 'avatar_url' => $this->request->param('avatarUrl', ''), 'gender' => $this->request->param('gender/d', 0), 'real_name' => $this->request->param('real_name/s', '',"trim"), @@ -88,7 +88,7 @@ class User extends Base 'create_time' => $nowDate, 'login_time' => $nowDate, 'type' => Account::type_consumer, // 默认为普通消费者 - 'nick_name' => filterEmoji($params['nick_name']) ?: generateDefaultNickName(), + 'nick_name' => $params['nick_name'] ?: generateDefaultNickName(), 'avatar_url' => $params['avatar_url'] ?: Account::DEFAULT_AVATAR, 'gender' => $params['gender'], 'real_name' => $params['real_name'],