X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FUserBundle%2FEntity%2FUser.php;h=dfed8e47d4ab52000319f3536205004c7f87365b;hb=refs%2Fpull%2F2103%2Fhead;hp=e3b9a519c7e42617ec816f98edefdf53a01cb2ad;hpb=bd0f3d32c9ccb8f7a1409edb960b909a5e6a096d;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/UserBundle/Entity/User.php b/src/Wallabag/UserBundle/Entity/User.php index e3b9a519..dfed8e47 100644 --- a/src/Wallabag/UserBundle/Entity/User.php +++ b/src/Wallabag/UserBundle/Entity/User.php @@ -6,14 +6,13 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface; use Scheb\TwoFactorBundle\Model\TrustedComputerInterface; -use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; -use Symfony\Component\Security\Core\User\UserInterface; +use FOS\UserBundle\Model\User as BaseUser; use JMS\Serializer\Annotation\ExclusionPolicy; use JMS\Serializer\Annotation\Expose; -use FOS\UserBundle\Model\User as BaseUser; +use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; +use Symfony\Component\Security\Core\User\UserInterface; use Wallabag\CoreBundle\Entity\Config; use Wallabag\CoreBundle\Entity\Entry; -use Wallabag\CoreBundle\Entity\Tag; /** * User. @@ -69,11 +68,6 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf */ protected $config; - /** - * @ORM\OneToMany(targetEntity="Wallabag\CoreBundle\Entity\Tag", mappedBy="user", cascade={"remove"}) - */ - protected $tags; - /** * @ORM\Column(type="integer", nullable=true) */ @@ -94,8 +88,7 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf { parent::__construct(); $this->entries = new ArrayCollection(); - $this->tags = new ArrayCollection(); - $this->roles = array('ROLE_USER'); + $this->roles = ['ROLE_USER']; } /** @@ -171,26 +164,6 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf return $this->entries; } - /** - * @param Entry $entry - * - * @return User - */ - public function addTag(Tag $tag) - { - $this->tags[] = $tag; - - return $this; - } - - /** - * @return ArrayCollection - */ - public function getTags() - { - return $this->tags; - } - public function isEqualTo(UserInterface $user) { return $this->username === $user->getUsername();