* Finish task #36495.

This commit is contained in:
holan20180123
2021-03-10 15:31:39 +08:00
parent 86055e545f
commit 0a9d1bb510
4 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -1159,7 +1159,7 @@ class user extends control
{
$size = fixer::input('post')->get();
$this->file->cropImage($image->realPath, $image->realPath, $size->left, $size->top, $size->right - $size->left, $size->bottom - $size->top, $size->scaled ? $size->scaleWidth : 0, $size->scaled ? $size->scaleHeight : 0);
$this->dao->update(TABLE_USER)->set('avatar')->eq($image->webPath)->where('account')->eq($this->app->user->account)->exec();
$this->app->user->avatar = $image->webPath;
exit('success');
}