[Security] Fix SerializableUser fixture
Signed-off-by: Alexander M. Turek <me@derrabus.de>
This commit is contained in:
parent
b87de425c0
commit
8fbf3bb3c7
@ -322,12 +322,22 @@ class SerializableUser implements UserInterface, \Serializable
|
||||
|
||||
public function serialize(): string
|
||||
{
|
||||
return serialize($this->name);
|
||||
return serialize($this->__serialize());
|
||||
}
|
||||
|
||||
public function unserialize($serialized): void
|
||||
{
|
||||
$this->name = unserialize($serialized);
|
||||
$this->__unserialize(unserialize($serialized));
|
||||
}
|
||||
|
||||
public function __serialize(): array
|
||||
{
|
||||
return ['name' => $this->name];
|
||||
}
|
||||
|
||||
public function __unserialize(array $data): void
|
||||
{
|
||||
['name' => $this->name] = $data;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user