diff options
author | Thomas Citharel <tcit@tcit.fr> | 2017-05-31 09:31:18 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2017-06-23 10:08:54 +0200 |
commit | bf6c0346d8d35a719dd1bff1cb4d573d422f99ff (patch) | |
tree | 04fb80e20ad1cffacb72357a632a9afe2ec058cb /src/Wallabag/UserBundle | |
parent | d6d3f4ec3698effd1d4b063e295341791bdcf7d7 (diff) | |
download | wallabag-federation.tar.gz wallabag-federation.tar.zst wallabag-federation.zip |
WIPfederation
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'src/Wallabag/UserBundle')
-rw-r--r-- | src/Wallabag/UserBundle/Entity/User.php | 27 |
1 files changed, 27 insertions, 0 deletions
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; | |||
15 | use Wallabag\ApiBundle\Entity\Client; | 15 | use Wallabag\ApiBundle\Entity\Client; |
16 | use Wallabag\CoreBundle\Entity\Config; | 16 | use Wallabag\CoreBundle\Entity\Config; |
17 | use Wallabag\CoreBundle\Entity\Entry; | 17 | use Wallabag\CoreBundle\Entity\Entry; |
18 | use Wallabag\FederationBundle\Entity\Account; | ||
18 | 19 | ||
19 | /** | 20 | /** |
20 | * User. | 21 | * User. |
@@ -129,6 +130,14 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf | |||
129 | */ | 130 | */ |
130 | protected $default_client; | 131 | protected $default_client; |
131 | 132 | ||
133 | /** | ||
134 | * @ORM\OneToOne(targetEntity="Wallabag\FederationBundle\Entity\Account", mappedBy="user", cascade={"remove"}) | ||
135 | */ | ||
136 | protected $account; | ||
137 | |||
138 | /** | ||
139 | * User constructor. | ||
140 | */ | ||
132 | public function __construct() | 141 | public function __construct() |
133 | { | 142 | { |
134 | parent::__construct(); | 143 | parent::__construct(); |
@@ -333,4 +342,22 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf | |||
333 | { | 342 | { |
334 | $this->notifications = $notifications; | 343 | $this->notifications = $notifications; |
335 | } | 344 | } |
345 | |||
346 | /** | ||
347 | * @return Account | ||
348 | */ | ||
349 | public function getAccount() | ||
350 | { | ||
351 | return $this->account; | ||
352 | } | ||
353 | |||
354 | /** | ||
355 | * @param mixed $account | ||
356 | * @return User | ||
357 | */ | ||
358 | public function setAccount(Account $account) | ||
359 | { | ||
360 | $this->account = $account; | ||
361 | return $this; | ||
362 | } | ||
336 | } | 363 | } |