mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-10-30 18:06:16 +01:00
Uploaded Avatar removed from user's yaml when editing the user [#1647]
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fix for homepage admin preview [#2426](https://github.com/getgrav/grav/issues/2426)
|
||||
* Uploaded Avatar removed from user's yaml when editing the user [#1647](https://github.com/getgrav/grav-plugin-admin/issues/1647)
|
||||
|
||||
# v1.9.1
|
||||
## 04/13/2019
|
||||
|
||||
@@ -764,6 +764,8 @@ class AdminBaseController
|
||||
} else {
|
||||
$obj->modifyHeader($init_key, $new_data);
|
||||
}
|
||||
} elseif ($obj instanceof UserInterface and $key === 'avatar') {
|
||||
$obj->set($key, $files);
|
||||
} else {
|
||||
// TODO: [this is JS handled] if it's single file, remove existing and use set, if it's multiple, use join
|
||||
$obj->join($key, $files); // stores
|
||||
|
||||
@@ -708,7 +708,6 @@ class AdminController extends AdminBaseController
|
||||
}
|
||||
|
||||
$user->update($data->toArray());
|
||||
$user->undef('avatar');
|
||||
|
||||
$user = $this->storeFiles($user);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user