mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-01 02:46:04 +01:00
Fixed issue admin.super or admin.users users changing the account when saving another user [#713]
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user