Fixed lowering uppercase characters in usernames when saving from frontend [#2565]

This commit is contained in:
Matias Griese
2021-02-08 14:21:10 +02:00
parent c7dcb9144c
commit 11d0103f0d
3 changed files with 7 additions and 3 deletions

View File

@@ -14,6 +14,7 @@
* Fixed `Flex Pages` using only default language in frontend [#106](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/106)
* Fixed empty `route()` and `raw_route()` when getting translated pages [#3184](https://github.com/getgrav/grav/pull/3184)
* Fixed error on `bin/gpm plugin uninstall` [#3207](https://github.com/getgrav/grav/issues/3207)
* Fixed lowering uppercase characters in usernames when saving from frontend [#2565](https://github.com/getgrav/grav/pull/2565)
# v1.7.5
## 02/01/2021

View File

@@ -535,7 +535,7 @@ class UserObject extends FlexObject implements UserInterface, Countable
}
/**
* Save user without the username
* Save user
*
* @return static
*/

View File

@@ -110,7 +110,7 @@ class User extends Data implements UserInterface
}
/**
* Save user without the username
* Save user
*
* @return void
*/
@@ -138,7 +138,10 @@ class User extends Data implements UserInterface
}
$data = $this->items;
unset($data['username'], $data['authenticated'], $data['authorized']);
if ($username === $data['username']) {
unset($data['username']);
}
unset($data['authenticated'], $data['authorized']);
$file->save($data);