From fed3bc7f8552f3fcb888d33c43a8eb0ede42a718 Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Mon, 29 Mar 2021 20:01:01 +0000 Subject: [PATCH] - Added a __tostring method to the user entity --- src/Entity/User.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Entity/User.php b/src/Entity/User.php index f41af29..9de20d0 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -83,6 +83,11 @@ class User { public bool $logged = false; + public function __toString() : string + { + return $this->fullname(); + } + public function setPassword($password) : self { $this->password = $password;