Fixed a problem when moving and adding the user's avatar in the registry
This commit is contained in:
parent
0c473367d5
commit
182e3a63b0
1 changed files with 2 additions and 2 deletions
|
@ -420,8 +420,8 @@ class UsersModel extends BaseModel
|
|||
//$builder->resetQuery();
|
||||
// Move the file to it's new home
|
||||
$filename = $user['username'] . '.' . $image->getExtension();
|
||||
$image->move(FCPATH . '/img/users/', $filename);
|
||||
$this->where('id', $id)->update(['img' => $filename]);
|
||||
$image->move(ROOTPATH . '/public/img/users/', $filename);$image->move(ROOTPATH . '/public/img/users/', $filename, true);
|
||||
$this->where('id', $id)->set(['img' => $filename])->update();
|
||||
$response['ok'] = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue