aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle/Entity/User.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-12-29 14:50:52 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2015-12-29 14:50:52 +0100
commitfc73222723c7a0c9b577805d3ef51eb96b124b92 (patch)
tree002b77b82266b1e497e3683e72f4a457d4353633 /src/Wallabag/UserBundle/Entity/User.php
parentc997cfcc9c161241a6398b0942a1a869688d807a (diff)
downloadwallabag-fc73222723c7a0c9b577805d3ef51eb96b124b92.tar.gz
wallabag-fc73222723c7a0c9b577805d3ef51eb96b124b92.tar.zst
wallabag-fc73222723c7a0c9b577805d3ef51eb96b124b92.zip
Remove user reference in tag
Fix #1543
Diffstat (limited to 'src/Wallabag/UserBundle/Entity/User.php')
-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();