mirror of
https://github.com/getgrav/grav.git
synced 2026-05-06 08:36:49 +02:00
Fixed Argument 1 passed to Grav\Common\User\DataUser\User::filterUsername() must be of the type string [#1992]
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
* Fixed broken list in `bin/gpm index` [#3092](https://github.com/getgrav/grav/issues/3092)
|
||||
* Fixed CLI/GPM command failures returning 0 (success) value [#3017](https://github.com/getgrav/grav/issues/3017)
|
||||
* Fixed unimplemented `PageObject::getOriginal()` call [#3098](https://github.com/getgrav/grav/issues/3098)
|
||||
* Fixed `Argument 1 passed to Grav\Common\User\DataUser\User::filterUsername() must be of the type string` [#1992](https://github.com/getgrav/grav-plugin-admin/issues/1992)
|
||||
|
||||
# v1.7.0-rc.19
|
||||
## 12/02/2020
|
||||
|
||||
@@ -43,6 +43,8 @@ class UserCollection extends FlexCollection implements UserCollectionInterface
|
||||
*/
|
||||
public function load($username): UserInterface
|
||||
{
|
||||
$username = (string)$username;
|
||||
|
||||
if ($username !== '') {
|
||||
$key = $this->filterUsername($username);
|
||||
$user = $this->get($key);
|
||||
|
||||
@@ -79,6 +79,8 @@ class UserIndex extends FlexIndex
|
||||
*/
|
||||
public function load($username): UserInterface
|
||||
{
|
||||
$username = (string)$username;
|
||||
|
||||
if ($username !== '') {
|
||||
$key = static::filterUsername($username, $this->getFlexDirectory()->getStorage());
|
||||
$user = $this->get($key);
|
||||
|
||||
@@ -120,7 +120,7 @@ class User extends Data implements UserInterface
|
||||
}
|
||||
|
||||
if ($file) {
|
||||
$username = $this->filterUsername($this->get('username'));
|
||||
$username = $this->filterUsername((string)$this->get('username'));
|
||||
|
||||
if (!$file->filename()) {
|
||||
$locator = Grav::instance()['locator'];
|
||||
|
||||
@@ -48,6 +48,8 @@ class UserCollection implements UserCollectionInterface
|
||||
*/
|
||||
public function load($username): UserInterface
|
||||
{
|
||||
$username = (string)$username;
|
||||
|
||||
$grav = Grav::instance();
|
||||
/** @var UniformResourceLocator $locator */
|
||||
$locator = $grav['locator'];
|
||||
|
||||
Reference in New Issue
Block a user