mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fixed: force string on username
This commit is contained in:
parent
db9fef095a
commit
8863e0a92e
@ -506,11 +506,11 @@ class User implements UserInterface
|
|||||||
*
|
*
|
||||||
* @return User
|
* @return User
|
||||||
*/
|
*/
|
||||||
public function setUsername($name)
|
public function setUsername(?string $name)
|
||||||
{
|
{
|
||||||
$this->username = $name;
|
$this->username = (string) $name;
|
||||||
|
|
||||||
if (empty($this->getLabel())) {
|
if ("" === trim($this->getLabel())) {
|
||||||
$this->setLabel($name);
|
$this->setLabel($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user