Use $grav['accounts'] instead of $grav['users']

This commit is contained in:
Matias Griese
2019-03-27 14:52:23 +02:00
parent 551a888573
commit f4c26b6715
5 changed files with 8 additions and 7 deletions

View File

@@ -147,7 +147,7 @@ class AdminController extends AdminBaseController
if (isset($data['password'])) {
/** @var UserCollectionInterface $users */
$users = $this->grav['users'];
$users = $this->grav['accounts'];
$username = isset($data['username']) ? strip_tags(strtolower($data['username'])) : null;
$user = $username ? $users->load($username) : null;
@@ -217,7 +217,7 @@ class AdminController extends AdminBaseController
$login = $this->grav['login'];
/** @var UserCollectionInterface $users */
$users = $this->grav['users'];
$users = $this->grav['accounts'];
$username = isset($data['username']) ? strip_tags(strtolower($data['username'])) : '';
$user = !empty($username) ? $users->load($username) : null;
@@ -685,7 +685,7 @@ class AdminController extends AdminBaseController
if ($this->view === 'user') {
if ($obj->username === $this->grav['user']->username) {
/** @var UserCollectionInterface $users */
$users = $this->grav['users'];
$users = $this->grav['accounts'];
//Editing current user. Reload user object
unset($this->grav['user']->avatar);