作者 刘朕
1 个管道 的构建 通过 耗费 0 秒

合并分支 'Branch_liuzhen' 到 'master'

Branch liuzhen



查看合并请求 !288
... ... @@ -957,9 +957,15 @@ class User extends Api
$user = $this->auth->getUser();
$nickname = $this->request->request('nickname');
$avatar = $this->request->request('avatar', '', 'trim,strip_tags,htmlspecialchars');
$user->nickname = $nickname;
$user->avatar = $avatar;
$user->save();
if($nickname || $avatar) {
if($nickname) {
$user->nickname = $nickname;
}
if($avatar) {
$user->avatar = $avatar;
}
$user->save();
}
$this->success();
}
... ...