...
|
...
|
@@ -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();
|
|
|
}
|
|
|
|
...
|
...
|
|