aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle
diff options
context:
space:
mode:
authorNicolas Lœuillet <nicolas@loeuillet.org>2016-01-02 12:46:52 +0100
committerNicolas Lœuillet <nicolas@loeuillet.org>2016-01-02 12:46:52 +0100
commitdad1c546a521159ca65a5a7649651d37728f0e55 (patch)
treef1d59eb83b45adb83bb21726374133a399d3c740 /src/Wallabag/UserBundle
parent5432f6150939af6e7d2e8bf0faea0576491aaed0 (diff)
parent6be9750155fa731d75898b4973a126a090345c2d (diff)
downloadwallabag-dad1c546a521159ca65a5a7649651d37728f0e55.tar.gz
wallabag-dad1c546a521159ca65a5a7649651d37728f0e55.tar.zst
wallabag-dad1c546a521159ca65a5a7649651d37728f0e55.zip
Merge pull request #1545 from wallabag/v2-user-tag
v2 – Remove user reference in tag
Diffstat (limited to 'src/Wallabag/UserBundle')
-rw-r--r--src/Wallabag/UserBundle/Entity/User.php27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/Wallabag/UserBundle/Entity/User.php b/src/Wallabag/UserBundle/Entity/User.php
index e3b9a519..e6528420 100644
--- a/src/Wallabag/UserBundle/Entity/User.php
+++ b/src/Wallabag/UserBundle/Entity/User.php
@@ -13,7 +13,6 @@ use JMS\Serializer\Annotation\Expose;
13use FOS\UserBundle\Model\User as BaseUser; 13use FOS\UserBundle\Model\User as BaseUser;
14use Wallabag\CoreBundle\Entity\Config; 14use Wallabag\CoreBundle\Entity\Config;
15use Wallabag\CoreBundle\Entity\Entry; 15use Wallabag\CoreBundle\Entity\Entry;
16use Wallabag\CoreBundle\Entity\Tag;
17 16
18/** 17/**
19 * User. 18 * User.
@@ -70,11 +69,6 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
70 protected $config; 69 protected $config;
71 70
72 /** 71 /**
73 * @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\Tag", mappedBy="user", cascade={"remove"})
74 */
75 protected $tags;
76
77 /**
78 * @ORM\Column(type="integer", nullable=true) 72 * @ORM\Column(type="integer", nullable=true)
79 */ 73 */
80 private $authCode; 74 private $authCode;
@@ -94,7 +88,6 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
94 { 88 {
95 parent::__construct(); 89 parent::__construct();
96 $this->entries = new ArrayCollection(); 90 $this->entries = new ArrayCollection();
97 $this->tags = new ArrayCollection();
98 $this->roles = array('ROLE_USER'); 91 $this->roles = array('ROLE_USER');
99 } 92 }
100 93
@@ -171,26 +164,6 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
171 return $this->entries; 164 return $this->entries;
172 } 165 }
173 166
174 /**
175 * @param Entry $entry
176 *
177 * @return User
178 */
179 public function addTag(Tag $tag)
180 {
181 $this->tags[] = $tag;
182
183 return $this;
184 }
185
186 /**
187 * @return ArrayCollection<Tag>
188 */
189 public function getTags()
190 {
191 return $this->tags;
192 }
193
194 public function isEqualTo(UserInterface $user) 167 public function isEqualTo(UserInterface $user)
195 { 168 {
196 return $this->username === $user->getUsername(); 169 return $this->username === $user->getUsername();