Fixed issue admin.super or admin.users users changing the account when saving another user [#713]

This commit is contained in:
Flavio Copes
2017-01-31 11:11:27 +01:00
parent 3d9c99c824
commit f7401543df
2 changed files with 10 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
# v1.2.11
## xx/xx/2017
1. [](#bugfix)
* Fixed issue `admin.super` or `admin.users` users changing the account when saving another user [#713](https://github.com/getgrav/grav-plugin-admin/issues/713)
# v1.2.10 # v1.2.10
## 1/30/2017 ## 1/30/2017

View File

@@ -556,7 +556,10 @@ class AdminController extends AdminBaseController
$config->reload(); $config->reload();
if ($this->view === 'user') { if ($this->view === 'user') {
$this->grav['user']->merge(User::load($this->admin->route)->toArray()); if ($obj->username == $this->grav['user']->username) {
//Editing current user. Reload user object
$this->grav['user']->merge(User::load($this->admin->route)->toArray());
}
} }
} }