add toString method on User

This commit is contained in:
Simon Vieille 2021-03-23 23:21:18 +01:00
parent e93a63f9e9
commit f3687876dc
1 changed files with 5 additions and 0 deletions

View File

@ -82,6 +82,11 @@ class User implements UserInterface, TwoFactorInterface, EntityInterface
$this->posts = new ArrayCollection();
}
public function __toString()
{
return (string) $this->getDisplayName();
}
/**
* @return Collection|Post[]
*/