From bf6c0346d8d35a719dd1bff1cb4d573d422f99ff Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 31 May 2017 09:31:18 +0200 Subject: WIP Signed-off-by: Thomas Citharel --- src/Wallabag/UserBundle/Entity/User.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/Wallabag/UserBundle') diff --git a/src/Wallabag/UserBundle/Entity/User.php b/src/Wallabag/UserBundle/Entity/User.php index aed5c73e..f11a277d 100644 --- a/src/Wallabag/UserBundle/Entity/User.php +++ b/src/Wallabag/UserBundle/Entity/User.php @@ -15,6 +15,7 @@ use Symfony\Component\Security\Core\User\UserInterface; use Wallabag\ApiBundle\Entity\Client; use Wallabag\CoreBundle\Entity\Config; use Wallabag\CoreBundle\Entity\Entry; +use Wallabag\FederationBundle\Entity\Account; /** * User. @@ -129,6 +130,14 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf */ protected $default_client; + /** + * @ORM\OneToOne(targetEntity="Wallabag\FederationBundle\Entity\Account", mappedBy="user", cascade={"remove"}) + */ + protected $account; + + /** + * User constructor. + */ public function __construct() { parent::__construct(); @@ -333,4 +342,22 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf { $this->notifications = $notifications; } + + /** + * @return Account + */ + public function getAccount() + { + return $this->account; + } + + /** + * @param mixed $account + * @return User + */ + public function setAccount(Account $account) + { + $this->account = $account; + return $this; + } } -- cgit v1.2.3