add toString method on User
This commit is contained in:
parent
e93a63f9e9
commit
f3687876dc
|
@ -82,6 +82,11 @@ class User implements UserInterface, TwoFactorInterface, EntityInterface
|
|||
$this->posts = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
return (string) $this->getDisplayName();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection|Post[]
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue