src/Entity/User.php line 28

Open in your IDE?
  1. <?php
  2. // src/Entity/User.php
  3. namespace App\Entity;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  9. use Symfony\Component\Security\Core\User\UserInterface;
  10. use Symfony\Component\DependencyInjection\ContainerInterface;
  11. use Symfony\Component\HttpFoundation\File\File;
  12. use SpecShaper\EncryptBundle\Annotations\Encrypted;
  13. use Doctrine\Common\Collections\Criteria;
  14. use FOS\UserBundle\Model\User as BaseUser;
  15. use App\Entity\Cart;
  16. /**
  17.  * @ORM\Table(name="app_users")
  18.  * @ORM\Entity(repositoryClass="App\Repository\UserRepository")
  19.  * @UniqueEntity(fields="email", message="Email already taken")
  20.  * @UniqueEntity(fields="displayName", message="Votre usagé est déja pris")
  21.  *
  22.  */
  23. class User extends BaseUser
  24. {
  25.     /**
  26.      * @ORM\Id
  27.      * @ORM\Column(type="integer")
  28.      * @ORM\GeneratedValue(strategy="AUTO")
  29.      */
  30.     protected $id;
  31.     /**
  32.      * @ORM\Column(type="datetime")
  33.      */
  34.     private $dateCreated;
  35.     /**
  36.      * @ORM\Column(type="string", length=255, nullable=true)
  37.      */
  38.     private $firstName;
  39.     /**
  40.      * @ORM\Column(type="string", length=255, nullable=true)
  41.      */
  42.     private $displayName;
  43.     /**
  44.      * @ORM\Column(type="string", length=255, nullable=true)
  45.      */
  46.     private $lastName;
  47.     /**
  48.      * @ORM\Column(type="string", length=15, nullable=true)
  49.      */
  50.     private $phone;
  51.     /**
  52.      * @ORM\Column(type="string", length=4)
  53.      */
  54.     private $lang='fr';
  55.     /**
  56.      * @ORM\OneToMany(targetEntity="App\Entity\Notification", mappedBy="user", orphanRemoval=true, cascade={"remove"})
  57.      * @ORM\OrderBy({"dateCreated" = "DESC"})
  58.      */
  59.     private $notifications;
  60.     /**
  61.      * @ORM\OneToOne(targetEntity="App\Entity\Image",orphanRemoval=true, cascade={"remove"})
  62.      */
  63.     private $profileImage;
  64.     /**
  65.      * @ORM\Column(type="boolean")
  66.      */
  67.     private $settingsReceiveMessageNotification=true;
  68.     /**
  69.      * @ORM\Column(name="facebook_id", type="string", length=255, nullable=true)
  70.      */
  71.     private $facebookId;
  72.     private $facebookAccessToken;
  73.     /**
  74.      * @ORM\Column(name="google_id", type="string", length=255, nullable=true)
  75.      */
  76.     private $googleId;
  77.     private $googleAccessToken;
  78.     /**
  79.      * @ORM\Column(name="linkedin_id", type="string", length=255, nullable=true)
  80.      */
  81.     private $linkedinId;
  82.     private $linkedinAccessToken;
  83.     /**
  84.      * @ORM\OneToMany(targetEntity="App\Entity\UserVariables", mappedBy="user", cascade={"remove"}, orphanRemoval=true)
  85.      */
  86.     private $variables;
  87.     /**
  88.      * @ORM\ManyToMany(targetEntity="App\Entity\Company", mappedBy="usersAdmin")
  89.      */
  90.     private $adminOfCompanies;
  91.     /**
  92.      * @ORM\OneToMany(targetEntity="App\Entity\UserShippingLocation", mappedBy="user", cascade={"persist", "remove"})
  93.      */
  94.     private $shippingAddresses;
  95.     /**
  96.      * @ORM\OneToMany(targetEntity="App\Entity\UserSearch", mappedBy="user", orphanRemoval=true)
  97.      */
  98.     private $searches;
  99.     /**
  100.      * @ORM\OneToMany(targetEntity="App\Entity\UserViewedProduct", mappedBy="user", orphanRemoval=true)
  101.      */
  102.     private $viewedProducts;
  103.     /**
  104.      * @ORM\Column(type="datetime", nullable=true)
  105.      */
  106.     private $termsAcceptanceDate;
  107.     /**
  108.      * @ORM\Column(type="string", length=100, nullable=true)
  109.      */
  110.     private $termsAcceptanceIp;
  111.     /**
  112.      * @ORM\OneToMany(targetEntity="App\Entity\FinancialLog", mappedBy="userPaying")
  113.      */
  114.     private $transactionsPaid;
  115.     /**
  116.      * @ORM\OneToMany(targetEntity="App\Entity\FinancialLog", mappedBy="userReceiving")
  117.      */
  118.     private $transactionsReceived;
  119.     /**
  120.      * @ORM\Column(type="string", length=255, nullable=true)
  121.      * @Encrypted
  122.      */
  123.     private $stripeAccountId;
  124.     /**
  125.      * @ORM\OneToMany(targetEntity="App\Entity\UserFavorite", mappedBy="user", orphanRemoval=true, cascade={"remove"})
  126.      */
  127.     private $favorites;
  128.     /**
  129.      * @ORM\OneToMany(targetEntity="App\Entity\Cart", mappedBy="user", orphanRemoval=true, cascade={"persist"})
  130.      */
  131.     private $carts;
  132.     /**
  133.      * @ORM\OneToMany(targetEntity="App\Entity\Image", mappedBy="user", orphanRemoval=true)
  134.      */
  135.     private $images;
  136.     /**
  137.      * @ORM\Column(type="boolean")
  138.      */
  139.     private $isBetaTester=false;
  140.     /**
  141.      * @ORM\ManyToMany(targetEntity="App\Entity\CartCoupon", inversedBy="usedByUsers")
  142.      */
  143.     private $couponsUsed;
  144.     /**
  145.      * @ORM\Column(type="integer", nullable=true)
  146.      */
  147.     private $paymentLast4digits;
  148.     /**
  149.      * @ORM\OneToMany(targetEntity="App\Entity\RecurringOrder", mappedBy="user", orphanRemoval=true)
  150.      */
  151.     private $recurringOrders;
  152.     /**
  153.      * @ORM\OneToMany(targetEntity="App\Entity\CartCoupon", mappedBy="forUser")
  154.      */
  155.     private $cartCoupons;
  156.     /**
  157.      * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="usersReferred")
  158.      */
  159.     private $referredBy;
  160.     /**
  161.      * @ORM\OneToMany(targetEntity="App\Entity\User", mappedBy="referredBy")
  162.      */
  163.     private $usersReferred;
  164.     /**
  165.      * @ORM\OneToMany(targetEntity="App\Entity\Subscription", mappedBy="forUser")
  166.      */
  167.     private $subscriptions;
  168.     /**
  169.      * @ORM\Column(type="boolean")
  170.      */
  171.     private $IsARecruiter=false;
  172.     /**
  173.      * @ORM\Column(type="boolean")
  174.      */
  175.     private $isHri=false;
  176.     /**
  177.      * @ORM\OneToMany(targetEntity="App\Entity\Company", mappedBy="recruiter")
  178.      */
  179.     private $companiesRecruited;
  180.     /**
  181.      * @ORM\OneToMany(targetEntity="App\Entity\EmailSent", mappedBy="user")
  182.      */
  183.     private $emailReceiveds;
  184.     /**
  185.      * @ORM\Column(type="boolean")
  186.      * LEGACY TO BE REMOVED
  187.      */
  188.     private $isAllowedToMakeGroups=false;
  189.     /**
  190.      * @ORM\Column(type="string", length=255, nullable=true)
  191.      * LEGACY TO BE REMOVED
  192.      */
  193.     private $makeGroupName;
  194.     /**
  195.      * @ORM\OneToMany(targetEntity="App\Entity\Company", mappedBy="inGroupOfUser")
  196.      * LEGACY TO BE REMOVED
  197.      */
  198.     private $myGroupOfCompanies;
  199.     /**
  200.      * @ORM\ManyToMany(targetEntity="App\Entity\CompanyAssociation", inversedBy="adminUsers")
  201.      */
  202.     private $AdminOfCompanyAssociations;
  203.     /**
  204.      * @ORM\Column(type="boolean")
  205.      */
  206.     private $isAllowedToMakeCompanyForAssociation=false;
  207.     // /**
  208.     //  * @ORM\Column(type="string")
  209.     //  */
  210.     // protected $confirmationToken;
  211.     /**
  212.      * @ORM\ManyToOne(targetEntity="App\Entity\CompanyAssociation", inversedBy="usersAddingCompanies")
  213.      */
  214.     private $makeCompanyForAssociation;
  215.     /**
  216.      * @ORM\Column(type="boolean", nullable=false)
  217.      */
  218.     private $hasReusableBox=false;
  219.     /*
  220.      * @ORM\OneToMany(targetEntity="App\Entity\Message", mappedBy="userTo",orphanRemoval=true, cascade={"remove"})
  221.      */
  222.     //private $messages;
  223.     //$this->messages = new ArrayCollection();
  224.     /**
  225.      * @ORM\Column(type="boolean")
  226.      */
  227.     private $reminderCouponSent false;
  228.     /**
  229.      * @ORM\OneToOne(targetEntity="App\Entity\UserSurvey", mappedBy="user", cascade={"persist", "remove"})
  230.      */
  231.     private $userSurvey;
  232.     /**
  233.      * @ORM\Column(type="datetime")
  234.      */
  235.     private $nextUserSurveyTime;
  236.      /**
  237.      * @ORM\Column(type="boolean")
  238.      */
  239.     private $dontShowSurvey false;
  240.     /**
  241.      * @ORM\Column(type="boolean")
  242.      */
  243.     private $userSubscriptionMaturin false;
  244.       /**
  245.      * @ORM\Column(type="datetime")
  246.      */
  247.     private $dateLogSubscriptionMaturin;
  248.     /**
  249.      * @ORM\Column(type="string", length=255, nullable=true)
  250.      * @Encrypted
  251.      */
  252.     private $subscriptionStripeId;
  253.     public function __construct(){
  254.         $this->dateCreated = new \DateTime();
  255.         $this->roles = array('ROLE_ADMIN');
  256.         $this->variables = new ArrayCollection();
  257.         $this->date = new ArrayCollection();
  258.         $this->adminOfCompanies= new ArrayCollection();
  259.         $this->shippingAddresses = new ArrayCollection();
  260.         $this->searches = new ArrayCollection();
  261.         $this->viewedProducts = new ArrayCollection();
  262.         $this->transactionsPaid = new ArrayCollection();
  263.         $this->transactionsReceived = new ArrayCollection();
  264.         $this->favorites = new ArrayCollection();
  265.         $this->carts = new ArrayCollection();
  266.         $this->images = new ArrayCollection();
  267.         $this->couponsUsed = new ArrayCollection();
  268.         $this->recurringOrders = new ArrayCollection();
  269.         $this->cartCoupons = new ArrayCollection();
  270.         $this->usersReferred = new ArrayCollection();
  271.         $this->subscriptions = new ArrayCollection();
  272.         $this->companiesRecruited = new ArrayCollection();
  273.         $this->emailReceiveds = new ArrayCollection();
  274.         $this->myGroupOfCompanies = new ArrayCollection();
  275.         $this->AdminOfCompanyAssociations = new ArrayCollection();
  276.     }
  277.     public function getLoginType(){
  278.         if(!empty($this->googleAccessToken))
  279.             return 'google';
  280.         if(!empty($this->facebookAccessToken))
  281.             return 'facebook';
  282.         if(!empty($this->linkedinAccessToken))
  283.             return 'linkedin';
  284.         return 'form';
  285.     }
  286.     public function setId($id)
  287.     {
  288.         $this->id $id;
  289.     }
  290.     public function setEmail($email)
  291.     {
  292.         $email is_null($email) ? '' $email;
  293.         parent::setEmail($email);
  294.         $this->setUsername($email);
  295.         return $this;
  296.     }
  297.     public function setDateCreated($dateCreated)
  298.     {
  299.         $this->dateCreated $dateCreated;
  300.     }
  301.     public function getDateCreated()
  302.     {
  303.         return $this->dateCreated;
  304.     }
  305.     public function setFacebookId($facebookId)
  306.     {
  307.         $this->facebookId $facebookId;
  308.     }
  309.     public function getFacebookId()
  310.     {
  311.         return $this->facebookId;
  312.     }
  313.     public function setFacebookAccessToken($facebookAccessToken)
  314.     {
  315.         $this->facebookAccessToken $facebookAccessToken;
  316.     }
  317.     public function getFacebookAccessToken()
  318.     {
  319.         return $this->facebookAccessToken;
  320.     }
  321.     public function setGoogleId($googleId)
  322.     {
  323.         $this->googleId $googleId;
  324.     }
  325.     public function getGoogleId()
  326.     {
  327.         return $this->googleId;
  328.     }
  329.     public function setGoogleAccessToken($googleAccessToken)
  330.     {
  331.         $this->googleAccessToken $googleAccessToken;
  332.     }
  333.     public function getGoogleAccessToken()
  334.     {
  335.         return $this->googleAccessToken;
  336.     }
  337.     public function setLinkedinId($linkedinId)
  338.     {
  339.         $this->linkedinId $linkedinId;
  340.     }
  341.     public function getLinkedinId()
  342.     {
  343.         return $this->linkedinId;
  344.     }
  345.     public function setLinkedinAccessToken($linkedinAccessToken)
  346.     {
  347.         $this->linkedinAccessToken $linkedinAccessToken;
  348.     }
  349.     public function getLinkedinAccessToken()
  350.     {
  351.         return $this->linkedinAccessToken;
  352.     }
  353.     public function setSettingsReceiveMessageNotification($settingsReceiveMessageNotification)
  354.     {
  355.         $this->settingsReceiveMessageNotification $settingsReceiveMessageNotification;
  356.     }
  357.     public function getSettingsReceiveMessageNotification()
  358.     {
  359.         return $this->settingsReceiveMessageNotification;
  360.     }
  361.     public function getId()
  362.     {
  363.         return $this->id;
  364.     }
  365.     public function setFirstName($firstName)
  366.     {
  367.         $this->firstName $firstName;
  368.     }
  369.     public function getFirstName()
  370.     {
  371.         return $this->firstName;
  372.     }
  373.     public function setLastName($lastName)
  374.     {
  375.         $this->lastName $lastName;
  376.     }
  377.     public function getLastName()
  378.     {
  379.         return $this->lastName;
  380.     }
  381.     public function getFullName(){
  382.         return $this->firstName.' '.$this->lastName;
  383.     }
  384.     public function setPhone($phone)
  385.     {
  386.         $this->phone $phone;
  387.     }
  388.     public function getDisplayName(){
  389.         if(empty($this->displayName)){
  390.             if(!empty($this->firstName) || !empty($this->lastName)){
  391.                 $username substr($this->firstName01).'.'.$this->lastName;
  392.             }else{
  393.                 if(!empty($this->getEmail()))
  394.                     $username current(explode('@'$this->getEmail()));
  395.             }
  396.         }else
  397.             $username $this->displayName;
  398.         if(!empty($username))
  399.             return ucfirst($username);
  400.         else
  401.             return '';
  402.     }
  403.     public function setdisplayName($name){
  404.         $this->displayName $name;
  405.     }
  406.     public function getPhone()
  407.     {
  408.         if(!empty($this->phone))
  409.             return $this->phone;
  410.         if($this->getShippingAddresses()->count() > 0){
  411.             return $this->getShippingAddresses()->first()->getPhone();
  412.         }
  413.         return null;
  414.     }
  415.     public function setLocale($lang)
  416.     {
  417.         $this->lang $lang;
  418.     }
  419.     public function getLocale()
  420.     {
  421.         return $this->lang;
  422.     }
  423.     public function getLang()
  424.     {
  425.     return $this->lang;
  426.     }
  427.     public function setLang()
  428.     {
  429.     return $this->lang;
  430.     }
  431.     public function setNotifications($notifications)
  432.     {
  433.         $this->notifications $notifications;
  434.     }
  435.     public function getNotifications()
  436.     {
  437.         return $this->notifications;
  438.     }
  439.     public function setProfileImage($profileImage)
  440.     {
  441.         if($profileImage === false)
  442.             $profileImage null;
  443.         $this->profileImage $profileImage;
  444.     }
  445.     public function getProfileImage()
  446.     {
  447.         return $this->profileImage;
  448.     }
  449.     /**
  450.      * @return Collection|UserVariables[]
  451.      */
  452.     public function getVariables(): Collection
  453.     {
  454.         return $this->variables;
  455.     }
  456.     public function getVariable($varname$category=false){
  457.         foreach($this->variables as $variable){
  458.             if($category){
  459.                 if( ($variable->getName() == $varname) && ($variable->getCategory() == $category))
  460.                     return $variable;
  461.             }else{
  462.                 if($variable->getName() == $varname)
  463.                     return $variable;
  464.             }
  465.         }
  466.         return false;
  467.     }
  468.     /*
  469.      * @TODO Find the variable and set the right one
  470.      */
  471.     public function setVariable(UserVariables $variable){
  472.         return $this->addVariable($variable);
  473.     }
  474.     public function addVariable(UserVariables $variable): self
  475.     {
  476.         if (!$this->variables->contains($variable)) {
  477.             $this->variables[] = $variable;
  478.             $variable->setUser($this);
  479.         }else{
  480.             foreach($this->variables as $key => $var){
  481.                 if($var->getName() == $variable->getName() && $var->getCategory() && $variable->getCategory())
  482.                     $this->variables->get($key)->setValue($variable->getValue());
  483.             }
  484.         }
  485.         return $this;
  486.     }
  487.     public function removeVariable(UserVariables $variable): self
  488.     {
  489.         if ($this->variables->contains($variable)) {
  490.             $this->variables->removeElement($variable);
  491.             // set the owning side to null (unless already changed)
  492.             if ($variable->getUser() === $this) {
  493.                 $variable->setUser(null);
  494.             }
  495.         }
  496.         return $this;
  497.     }
  498.     /**
  499.      * @return Collection|Company[]
  500.      */
  501.     public function getProducts(): Collection
  502.     {
  503.         $combined = array();
  504.         foreach ($this->getCompanies() as $c){
  505.             $combined array_merge($combined$c->getProducts()->toArray());
  506.         }
  507.         return new ArrayCollection($combined);
  508.     }
  509.     /**
  510.      * @return Collection|Company[]
  511.      */
  512.     public function getCompanies(): Collection
  513.     {
  514.         if(!empty($this->getMakeCompanyForAssociation())){
  515.             $companies $this->adminOfCompanies;
  516.             foreach($this->getMakeCompanyForAssociation()->getCompanies() as $c){
  517.                 if(!$companies->contains($c))
  518.                     $companies[] = $c;
  519.             }
  520.             return $companies;
  521.         }else
  522.             return $this->adminOfCompanies;
  523.     }
  524.     public function addCompany(Company $company): self
  525.     {
  526.         if (!$this->adminOfCompanies->contains($company)) {
  527.             $this->adminOfCompanies[] = $company;
  528.             $company->addAdminUser($this);
  529.         }
  530.         return $this;
  531.     }
  532.     public function removeCompany(Company $company): self
  533.     {
  534.         if ($this->adminOfCompanies->contains($company)) {
  535.             $this->adminOfCompanies->removeElement($company);
  536.             $company->removeAdminUsers($this);
  537.         }
  538.         return $this;
  539.     }
  540.     public function getAdminOfCompanies(): Collection
  541.     {
  542.         return $this->adminOfCompanies;
  543.     }
  544.     public function addAdminOfCompany(Company $company): self
  545.     {
  546.         if (!$this->adminOfCompanies->contains($company)) {
  547.             $this->adminOfCompanies[] = $company;
  548.             $company->addAdminUser($this);
  549.         }
  550.         return $this;
  551.     }
  552.     public function removeAdminOfCompany(Company $company): self
  553.     {
  554.         if ($this->adminOfCompanies->contains($company)) {
  555.             $this->adminOfCompanies->removeElement($company);
  556.             $company->removeAdminUsers($this);
  557.         }
  558.         return $this;
  559.     }
  560.     /**
  561.      * @return Collection|UserShippingLocation[]
  562.      */
  563.     public function getShippingAddresses(): Collection
  564.     {
  565.         return $this->shippingAddresses;
  566.     }
  567.     public function getValidShippingAddresses(): Array
  568.     {
  569.         $validShippingAddresses = [];
  570.         $shippingAddresses $this->shippingAddresses;
  571.         foreach($shippingAddresses as $shippingAddresse) {
  572.           if ($shippingAddresse->isCityValid()) {
  573.             $validShippingAddresses[] = $shippingAddresse;
  574.           }
  575.         }
  576.         return $validShippingAddresses;
  577.     }
  578.     public function addShippingAddress(UserShippingLocation $shippingAddress): self
  579.     {
  580.         if (!$this->shippingAddresses->contains($shippingAddress)) {
  581.             $shippingAddress->setUser($this);
  582.             $this->shippingAddresses[] = $shippingAddress;
  583.         }
  584.         return $this;
  585.     }
  586.     public function removeShippingAddress(UserShippingLocation $shippingAddress): self
  587.     {
  588.         if ($this->shippingAddresses->contains($shippingAddress)) {
  589.             $this->shippingAddresses->removeElement($shippingAddress);
  590.         }
  591.         return $this;
  592.     }
  593.     /**
  594.      * @return Collection|UserSearch[]
  595.      */
  596.     public function getSearches(): Collection
  597.     {
  598.         return $this->searches;
  599.     }
  600.     public function addSearch(UserSearch $search): self
  601.     {
  602.         if (!$this->searches->contains($search)) {
  603.             $this->searches[] = $search;
  604.             $search->setUser($this);
  605.         }
  606.         return $this;
  607.     }
  608.     public function removeSearch(UserSearch $search): self
  609.     {
  610.         if ($this->searches->contains($search)) {
  611.             $this->searches->removeElement($search);
  612.             // set the owning side to null (unless already changed)
  613.             if ($search->getUser() === $this) {
  614.                 $search->setUser(null);
  615.             }
  616.         }
  617.         return $this;
  618.     }
  619.     /**
  620.      * @return Collection|UserViewedProduct[]
  621.      */
  622.     public function getViewedProducts(): Collection
  623.     {
  624.         return $this->viewedProducts;
  625.     }
  626.     public function addViewedProduct(UserViewedProduct $viewedProduct): self
  627.     {
  628.         if (!$this->viewedProducts->contains($viewedProduct)) {
  629.             $this->viewedProducts[] = $viewedProduct;
  630.             $viewedProduct->setUser($this);
  631.         }
  632.         return $this;
  633.     }
  634.     public function removeViewedProduct(UserViewedProduct $viewedProduct): self
  635.     {
  636.         if ($this->viewedProducts->contains($viewedProduct)) {
  637.             $this->viewedProducts->removeElement($viewedProduct);
  638.             // set the owning side to null (unless already changed)
  639.             if ($viewedProduct->getUser() === $this) {
  640.                 $viewedProduct->setUser(null);
  641.             }
  642.         }
  643.         return $this;
  644.     }
  645.     public function getTermsAcceptanceDate(): ?\DateTimeInterface
  646.     {
  647.         return $this->termsAcceptanceDate;
  648.     }
  649.     public function setTermsAcceptanceDate(?\DateTimeInterface $termsAcceptanceDate): self
  650.     {
  651.         $this->termsAcceptanceDate $termsAcceptanceDate;
  652.         return $this;
  653.     }
  654.     public function getTermsAcceptanceIp(): ?string
  655.     {
  656.         return $this->termsAcceptanceIp;
  657.     }
  658.     public function setTermsAcceptanceIp(?string $termsAcceptanceIp): self
  659.     {
  660.         $this->termsAcceptanceIp $termsAcceptanceIp;
  661.         return $this;
  662.     }
  663.     /**
  664.      * @return Collection|FinancialLog[]
  665.      */
  666.     public function getTransactionsPaid(): Collection
  667.     {
  668.         return $this->transactionsPaid;
  669.     }
  670.     public function addTransactionsPaid(FinancialLog $transactionsPaid): self
  671.     {
  672.         if (!$this->transactionsPaid->contains($transactionsPaid)) {
  673.             $this->transactionsPaid[] = $transactionsPaid;
  674.             $transactionsPaid->setUserPaying($this);
  675.         }
  676.         return $this;
  677.     }
  678.     public function removeTransactionsPaid(FinancialLog $transactionsPaid): self
  679.     {
  680.         if ($this->transactionsPaid->contains($transactionsPaid)) {
  681.             $this->transactionsPaid->removeElement($transactionsPaid);
  682.             // set the owning side to null (unless already changed)
  683.             if ($transactionsPaid->getUserPaying() === $this) {
  684.                 $transactionsPaid->setUserPaying(null);
  685.             }
  686.         }
  687.         return $this;
  688.     }
  689.     /**
  690.      * @return Collection|FinancialLog[]
  691.      */
  692.     public function getTransactionsReceived(): Collection
  693.     {
  694.         return $this->transactionsReceived;
  695.     }
  696.     public function addTransactionsReceived(FinancialLog $transactionsReceived): self
  697.     {
  698.         if (!$this->transactionsReceived->contains($transactionsReceived)) {
  699.             $this->transactionsReceived[] = $transactionsReceived;
  700.             $transactionsReceived->setUserReceiving($this);
  701.         }
  702.         return $this;
  703.     }
  704.     public function removeTransactionsReceived(FinancialLog $transactionsReceived): self
  705.     {
  706.         if ($this->transactionsReceived->contains($transactionsReceived)) {
  707.             $this->transactionsReceived->removeElement($transactionsReceived);
  708.             // set the owning side to null (unless already changed)
  709.             if ($transactionsReceived->getUserReceiving() === $this) {
  710.                 $transactionsReceived->setUserReceiving(null);
  711.             }
  712.         }
  713.         return $this;
  714.     }
  715.     public function getStripeAccountId(): ?string
  716.     {
  717.         return $this->stripeAccountId;
  718.     }
  719.     public function setStripeAccountId($stripeAccountId): self
  720.     {
  721.         $this->stripeAccountId $stripeAccountId;
  722.         return $this;
  723.     }
  724.     /**
  725.      * @return Collection|Message[]
  726.      */
  727.     /*
  728.     public function getMessages(): Collection
  729.     {
  730.         return $this->messages;
  731.     }
  732.     public function addMessage(Message $message): self
  733.     {
  734.         if (!$this->messages->contains($message)) {
  735.             $this->messages[] = $message;
  736.             $message->setUserTo($this);
  737.         }
  738.         return $this;
  739.     }
  740.     public function removeMessage(Message $message): self
  741.     {
  742.         if ($this->messages->contains($message)) {
  743.             $this->messages->removeElement($message);
  744.             // set the owning side to null (unless already changed)
  745.             if ($message->getUserTo() === $this) {
  746.                 $message->setUserTo(null);
  747.             }
  748.         }
  749.         return $this;
  750.     }
  751.      */
  752.     public function __toString(){
  753.         return $this->getId().' - '.$this->getEmail();
  754.     }
  755.     /**
  756.      * @return Collection|UserFavorite[]
  757.      */
  758.     public function getFavorites(): Collection
  759.     {
  760.         return $this->favorites;
  761.     }
  762.     public function hasFavorite(Product $product){
  763.         $return false;
  764.         foreach($this->getFavorites() as $f){
  765.             if($f->getProduct() == $product)
  766.                 return $f;
  767.         }
  768.         return $return;
  769.     }
  770.     public function addFavorite(UserFavorite $favorite): self
  771.     {
  772.         if (!$this->favorites->contains($favorite)) {
  773.             $this->favorites[] = $favorite;
  774.             $favorite->setUser($this);
  775.         }
  776.         return $this;
  777.     }
  778.     public function removeFavorite(UserFavorite $favorite): self
  779.     {
  780.         if ($this->favorites->contains($favorite)) {
  781.             $this->favorites->removeElement($favorite);
  782.             // set the owning side to null (unless already changed)
  783.             if ($favorite->getUser() === $this) {
  784.                 $favorite->setUser(null);
  785.             }
  786.         }
  787.         return $this;
  788.     }
  789.     /**
  790.      * @return Collection|Cart[]
  791.      */
  792.     public function getCart(){
  793.         $criteria Criteria::create();
  794.         $criteria
  795.             ->where(Criteria::expr()->eq('isPaid'false))
  796.             ->andWhere(Criteria::expr()->eq('isRefunded'false))
  797.             ->andWhere(Criteria::expr()->eq('isBulkOrder'false))
  798.             ;
  799.         $cart $this->carts->matching($criteria);
  800.         if(!empty($cart) && count($cart) > 0){
  801.             //Need to put all this in criteria;
  802.             $cart array_reverse($cart->toArray());
  803.             for($i 0$i <= count($cart); $i++){
  804.                 if(!is_bool(current($cart)) && current($cart)->getRecurringOrders()->count() == ){
  805.                     return current($cart);
  806.                 }
  807.                 next($cart);
  808.             }
  809.         }
  810.         $cart = new Cart();
  811.         $this->addCart($cart);
  812.         return $cart;
  813.     }
  814.     /*
  815.      * Set the current cart
  816.      */
  817.     public function setCart(Cart $cart){
  818.         if($this->getCarts()->count() > ){
  819.             $carts $this->getCarts();
  820.             $carts->set(0$cart);
  821.             $this->carts $carts;
  822.         }else
  823.             $this->addCart($cart);
  824.         return $this;
  825.     }
  826.     /*
  827.      * Return if its the first order of the user
  828.      */
  829.     public function isFirstOrder(): bool
  830.     {
  831.         $orders $this->getPaidOrders();
  832.         if(!empty($orders) && count($orders) == 1)
  833.             return true;
  834.         else
  835.             return false;
  836.     }
  837.     public function getPaidOrders($limit=false){
  838.         $criteria Criteria::create();
  839.         $criteria->where(Criteria::expr()->eq('isPaid'true));
  840.         $criteria->OrWhere(Criteria::expr()->eq('isRefunded'true));
  841.         $criteria->orderBy(array('datePayment' => Criteria::DESC));
  842.         if($limit)
  843.             $criteria->setMaxResults($limit);
  844.         return $this->carts->matching($criteria);
  845.     }
  846.     public function getCarts(): Collection
  847.     {
  848.         return $this->carts;
  849.     }
  850.     public function addCart(Cart $cart): self
  851.     {
  852.         if (!$this->carts->contains($cart)) {
  853.             $this->carts[] = $cart;
  854.             $cart->setUser($this);
  855.         }
  856.         return $this;
  857.     }
  858.     public function removeCart(Cart $cart): self
  859.     {
  860.         if ($this->carts->contains($cart)) {
  861.             $this->carts->removeElement($cart);
  862.             // set the owning side to null (unless already changed)
  863.             if ($cart->getUser() === $this) {
  864.                 $cart->setUser(null);
  865.             }
  866.         }
  867.         return $this;
  868.     }
  869.     /**
  870.      * @return Collection|Image[]
  871.      */
  872.     public function getImages(): Collection
  873.     {
  874.         return $this->images;
  875.     }
  876.     public function addImage(Image $image): self
  877.     {
  878.         if (!$this->images->contains($image)) {
  879.             $this->images[] = $image;
  880.             // $image->setUser2($this);
  881.         }
  882.         return $this;
  883.     }
  884.     public function removeImage(Image $image): self
  885.     {
  886.         if ($this->images->contains($image)) {
  887.             $this->images->removeElement($image);
  888.             // set the owning side to null (unless already changed)
  889.             // if ($image->getUser2() === $this) {
  890.             //     $image->setUser2(null);
  891.             // }
  892.         }
  893.         return $this;
  894.     }
  895.     public function isGranted($role)
  896.     {
  897.         return in_array($role$this->getRoles());
  898.     }
  899.     public function getIsBetaTester(): ?bool
  900.     {
  901.         return $this->isBetaTester;
  902.     }
  903.     public function setIsBetaTester(bool $isBetaTester): self
  904.     {
  905.         $this->isBetaTester $isBetaTester;
  906.         return $this;
  907.     }
  908.     /**
  909.      * @return Collection|CartCoupon[]
  910.      */
  911.     public function getCouponsUsed(): Collection
  912.     {
  913.         return $this->couponsUsed;
  914.     }
  915.     public function addCouponUsed(CartCoupon $couponsUsed): self
  916.     {
  917.         if (!$this->couponsUsed->contains($couponsUsed)) {
  918.             $this->couponsUsed[] = $couponsUsed;
  919.         }
  920.         return $this;
  921.     }
  922.     public function removeCouponUsed(CartCoupon $couponsUsed): self
  923.     {
  924.         if ($this->couponsUsed->contains($couponsUsed)) {
  925.             $this->couponsUsed->removeElement($couponsUsed);
  926.         }
  927.         return $this;
  928.     }
  929.     public function getPaymentLast4digits(): ?int
  930.     {
  931.         return $this->paymentLast4digits;
  932.     }
  933.     public function setPaymentLast4digits(?int $paymentLast4digits): self
  934.     {
  935.         $this->paymentLast4digits $paymentLast4digits;
  936.         return $this;
  937.     }
  938.     public function isABuyerAccount(): bool
  939.     {
  940.         if($this->adminOfCompanies->count() > 0)
  941.             return false;
  942.         else
  943.             return true;
  944.     }
  945.     /**
  946.      * @return Collection|RecurringOrder[]
  947.      */
  948.     public function getRecurringOrders(): Collection
  949.     {
  950.         return $this->recurringOrders;
  951.     }
  952.     public function addRecurringOrder(RecurringOrder $recurringOrder): self
  953.     {
  954.         if (!$this->recurringOrders->contains($recurringOrder)) {
  955.             $this->recurringOrders[] = $recurringOrder;
  956.             $recurringOrder->setUser($this);
  957.         }
  958.         return $this;
  959.     }
  960.     public function removeRecurringOrder(RecurringOrder $recurringOrder): self
  961.     {
  962.         if ($this->recurringOrders->contains($recurringOrder)) {
  963.             $this->recurringOrders->removeElement($recurringOrder);
  964.             // set the owning side to null (unless already changed)
  965.             if ($recurringOrder->getUser() === $this) {
  966.                 $recurringOrder->setUser(null);
  967.             }
  968.         }
  969.         return $this;
  970.     }
  971.     /**
  972.      * @return Collection|CartCoupon[]
  973.      */
  974.     public function getCartCoupons(): Collection
  975.     {
  976.         return $this->cartCoupons;
  977.     }
  978.     public function addCartCoupon(CartCoupon $cartCoupon): self
  979.     {
  980.         if (!$this->cartCoupons->contains($cartCoupon)) {
  981.             $this->cartCoupons[] = $cartCoupon;
  982.             $cartCoupon->setForUser($this);
  983.         }
  984.         return $this;
  985.     }
  986.     public function removeCartCoupon(CartCoupon $cartCoupon): self
  987.     {
  988.         if ($this->cartCoupons->contains($cartCoupon)) {
  989.             $this->cartCoupons->removeElement($cartCoupon);
  990.             // set the owning side to null (unless already changed)
  991.             if ($cartCoupon->getForUser() === $this) {
  992.                 $cartCoupon->setForUser(null);
  993.             }
  994.         }
  995.         return $this;
  996.     }
  997.     public function getConfirmationToken()
  998.     {
  999.         return $this->confirmationToken;
  1000.     }
  1001.     public function setConfirmationToken($confirmationToken)
  1002.     {
  1003.         $this->confirmationToken $confirmationToken;
  1004.         return $this;
  1005.     }
  1006.     public function getReferredBy(): ?self
  1007.     {
  1008.         return $this->referredBy;
  1009.     }
  1010.     public function setReferredBy(?self $referredBy): self
  1011.     {
  1012.         $this->referredBy $referredBy;
  1013.         return $this;
  1014.     }
  1015.     /**
  1016.      * @return Collection|self[]
  1017.      */
  1018.     public function getUsersReferred(): Collection
  1019.     {
  1020.         return $this->usersReferred;
  1021.     }
  1022.     public function addUsersReferred(self $usersReferred): self
  1023.     {
  1024.         if (!$this->usersReferred->contains($usersReferred)) {
  1025.             $this->usersReferred[] = $usersReferred;
  1026.             $usersReferred->setReferredBy($this);
  1027.         }
  1028.         return $this;
  1029.     }
  1030.     public function removeUsersReferred(self $usersReferred): self
  1031.     {
  1032.         if ($this->usersReferred->contains($usersReferred)) {
  1033.             $this->usersReferred->removeElement($usersReferred);
  1034.             // set the owning side to null (unless already changed)
  1035.             if ($usersReferred->getReferredBy() === $this) {
  1036.                 $usersReferred->setReferredBy(null);
  1037.             }
  1038.         }
  1039.         return $this;
  1040.     }
  1041.     /**
  1042.      * @return Collection|Subscription[]
  1043.      */
  1044.     public function getSubscriptions(): Collection
  1045.     {
  1046.         return $this->subscriptions;
  1047.     }
  1048.     public function addSubscription(Subscription $subscription): self
  1049.     {
  1050.         if (!$this->subscriptions->contains($subscription)) {
  1051.             $this->subscriptions[] = $subscription;
  1052.             $subscription->setForUser($this);
  1053.         }
  1054.         return $this;
  1055.     }
  1056.     public function removeSubscription(Subscription $subscription): self
  1057.     {
  1058.         if ($this->subscriptions->contains($subscription)) {
  1059.             $this->subscriptions->removeElement($subscription);
  1060.             // set the owning side to null (unless already changed)
  1061.             if ($subscription->getForUser() === $this) {
  1062.                 $subscription->setForUser(null);
  1063.             }
  1064.         }
  1065.         return $this;
  1066.     }
  1067.     public function getIsARecruiter(): ?bool
  1068.     {
  1069.         return $this->IsARecruiter;
  1070.     }
  1071.     public function setIsARecruiter(bool $IsARecruiter): self
  1072.     {
  1073.         $this->IsARecruiter $IsARecruiter;
  1074.         return $this;
  1075.     }
  1076.     public function getIsHri(): ?bool
  1077.     {
  1078.         return $this->isHri;
  1079.     }
  1080.     public function setIsHri(bool $isHri): self
  1081.     {
  1082.         $this->isHri $isHri;
  1083.         return $this;
  1084.     }
  1085.     /**
  1086.      * @return Collection|Company[]
  1087.      */
  1088.     public function getCompaniesRecruited(): Collection
  1089.     {
  1090.         return $this->companiesRecruited;
  1091.     }
  1092.     public function addCompaniesRecruited(Company $companiesRecruited): self
  1093.     {
  1094.         if (!$this->companiesRecruited->contains($companiesRecruited)) {
  1095.             $this->companiesRecruited[] = $companiesRecruited;
  1096.             $companiesRecruited->setRecruiter($this);
  1097.         }
  1098.         return $this;
  1099.     }
  1100.     public function removeCompaniesRecruited(Company $companiesRecruited): self
  1101.     {
  1102.         if ($this->companiesRecruited->contains($companiesRecruited)) {
  1103.             $this->companiesRecruited->removeElement($companiesRecruited);
  1104.             // set the owning side to null (unless already changed)
  1105.             if ($companiesRecruited->getRecruiter() === $this) {
  1106.                 $companiesRecruited->setRecruiter(null);
  1107.             }
  1108.         }
  1109.         return $this;
  1110.     }
  1111.     public function getValidSubscriptions(){
  1112.         $active = [];
  1113.         foreach($this->getSubscriptions() as $s){
  1114.             if($s->getIsActive() && $s->getFrequency() == 2)
  1115.                 $active[]=$s;
  1116.         }
  1117.         return $active;
  1118.     }
  1119.     public function getActiveSubscriptions(){
  1120.         $active = [];
  1121.         foreach($this->getSubscriptions() as $s){
  1122.             if($s->getIsActive())
  1123.                 $active[]=$s;
  1124.         }
  1125.         return $active;
  1126.     }
  1127.     /**
  1128.      * @return Collection|EmailSent[]
  1129.      */
  1130.     public function getEmailReceiveds(): Collection
  1131.     {
  1132.         return $this->emailReceiveds;
  1133.     }
  1134.     public function addEmailReceived(EmailSent $emailReceived): self
  1135.     {
  1136.         if (!$this->emailReceiveds->contains($emailReceived)) {
  1137.             $this->emailReceiveds[] = $emailReceived;
  1138.             $emailReceived->setUser($this);
  1139.         }
  1140.         return $this;
  1141.     }
  1142.     public function removeEmailReceived(EmailSent $emailReceived): self
  1143.     {
  1144.         if ($this->emailReceiveds->contains($emailReceived)) {
  1145.             $this->emailReceiveds->removeElement($emailReceived);
  1146.             // set the owning side to null (unless already changed)
  1147.             if ($emailReceived->getUser() === $this) {
  1148.                 $emailReceived->setUser(null);
  1149.             }
  1150.         }
  1151.         return $this;
  1152.     }
  1153.     /*
  1154.      * LEGACY DO NOT USE, WILL BE REMOVED
  1155.      */
  1156.     public function getIsAllowedToMakeGroups(): ?bool
  1157.     {
  1158.         return $this->isAllowedToMakeCompanyForAssociation;
  1159.     }
  1160.     /*
  1161.      * LEGACY DO NOT USE, WILL BE REMOVED
  1162.      */
  1163.     public function setIsAllowedToMakeGroups(bool $isAllowedToMakeGroups): self
  1164.     {
  1165.         $this->isAllowedToMakeCompanyForAssociation $isAllowedToMakeGroups;
  1166.         return $this;
  1167.     }
  1168.     public function getMakeGroupName(): ?string
  1169.     {
  1170.         if($this->getIsAllowedToMakeGroups() && empty($this->makeGroupName))
  1171.             return $this->getId();
  1172.         else
  1173.             return $this->makeGroupName;
  1174.     }
  1175.     public function setMakeGroupName(?string $makeGroupName): self
  1176.     {
  1177.         $this->makeGroupName $makeGroupName;
  1178.         return $this;
  1179.     }
  1180.     /**
  1181.      * @return Collection|Company[]
  1182.      */
  1183.     public function getMyGroupOfCompanies(): Collection
  1184.     {
  1185.         return $this->myGroupOfCompanies;
  1186.     }
  1187.     public function addMyGroupOfCompany(Company $myGroupOfCompany): self
  1188.     {
  1189.         if (!$this->myGroupOfCompanies->contains($myGroupOfCompany)) {
  1190.             $this->myGroupOfCompanies[] = $myGroupOfCompany;
  1191.             $myGroupOfCompany->setInGroupOfUser($this);
  1192.         }
  1193.         return $this;
  1194.     }
  1195.     public function removeMyGroupOfCompany(Company $myGroupOfCompany): self
  1196.     {
  1197.         if ($this->myGroupOfCompanies->contains($myGroupOfCompany)) {
  1198.             $this->myGroupOfCompanies->removeElement($myGroupOfCompany);
  1199.             // set the owning side to null (unless already changed)
  1200.             if ($myGroupOfCompany->getInGroupOfUser() === $this) {
  1201.                 $myGroupOfCompany->setInGroupOfUser(null);
  1202.             }
  1203.         }
  1204.         return $this;
  1205.     }
  1206.     public function getSwitchLink(){
  1207.         return '/?_switch_user='.$this->getEmail();
  1208.     }
  1209.     /**
  1210.      * @return Collection|CompanyAssociation[]
  1211.      */
  1212.     public function getMakeGroupOfAssociations(): Collection
  1213.     {
  1214.         return $this->makeGroupOfAssociations;
  1215.     }
  1216.     public function addMakeGroupOfAssociation(CompanyAssociation $makeGroupOfAssociation): self
  1217.     {
  1218.         if (!$this->makeGroupOfAssociations->contains($makeGroupOfAssociation)) {
  1219.             $this->makeGroupOfAssociations[] = $makeGroupOfAssociation;
  1220.         }
  1221.         return $this;
  1222.     }
  1223.     public function removeMakeGroupOfAssociation(CompanyAssociation $makeGroupOfAssociation): self
  1224.     {
  1225.         if ($this->makeGroupOfAssociations->contains($makeGroupOfAssociation)) {
  1226.             $this->makeGroupOfAssociations->removeElement($makeGroupOfAssociation);
  1227.         }
  1228.         return $this;
  1229.     }
  1230.     /**
  1231.      * @return Collection|CompanyAssociation[]
  1232.      */
  1233.     public function getAdminOfCompanyAssociations(): Collection
  1234.     {
  1235.         return $this->AdminOfCompanyAssociations;
  1236.     }
  1237.     public function addAdminOfCompanyAssociation(CompanyAssociation $adminOfCompanyAssociation): self
  1238.     {
  1239.         if (!$this->AdminOfCompanyAssociations->contains($adminOfCompanyAssociation)) {
  1240.             $this->AdminOfCompanyAssociations[] = $adminOfCompanyAssociation;
  1241.         }
  1242.         return $this;
  1243.     }
  1244.     public function removeAdminOfCompanyAssociation(CompanyAssociation $adminOfCompanyAssociation): self
  1245.     {
  1246.         if ($this->AdminOfCompanyAssociations->contains($adminOfCompanyAssociation)) {
  1247.             $this->AdminOfCompanyAssociations->removeElement($adminOfCompanyAssociation);
  1248.         }
  1249.         return $this;
  1250.     }
  1251.     public function getIsAllowedToMakeCompanyForAssociation(): ?bool
  1252.     {
  1253.         return $this->isAllowedToMakeCompanyForAssociation;
  1254.     }
  1255.     public function setIsAllowedToMakeCompanyForAssociation(bool $isAllowedToMakeCompanyForAssociation): self
  1256.     {
  1257.         $this->isAllowedToMakeCompanyForAssociation $isAllowedToMakeCompanyForAssociation;
  1258.         return $this;
  1259.     }
  1260.     public function getMakeCompanyForAssociation(): ?CompanyAssociation
  1261.     {
  1262.         return $this->makeCompanyForAssociation;
  1263.     }
  1264.     public function setMakeCompanyForAssociation(?CompanyAssociation $makeCompanyForAssociation): self
  1265.     {
  1266.         $this->makeCompanyForAssociation $makeCompanyForAssociation;
  1267.         return $this;
  1268.     }
  1269.     /**
  1270.      * @return bool
  1271.      */
  1272.     public function getHasReusableBox(): bool
  1273.     {
  1274.         return $this->hasReusableBox;
  1275.     }
  1276.     /**
  1277.      * @param bool $hasReusableBox
  1278.      * @return User
  1279.      */
  1280.     public function setHasReusableBox(bool $hasReusableBox): self
  1281.     {
  1282.         $this->hasReusableBox $hasReusableBox;
  1283.         return $this;
  1284.     }
  1285.     public function getPaidPickUpOrders(){
  1286.         $orders $this->getPaidOrders();
  1287.         $pickupOrders=[];
  1288.         if (!empty($orders)) {
  1289.             foreach ($orders as $order) {
  1290.                 if($order->hasPickUp() && $order->getIsPaid()){
  1291.                     array_push($pickupOrders,$order);
  1292.                 }
  1293.             }
  1294.         }
  1295.         return $pickupOrders;
  1296.     }
  1297.     public function getAllCartsProducts()
  1298.     {
  1299.         $tempArray = [];
  1300.         $products = [];
  1301.         $paidOrders $this->getPaidOrders();
  1302.         foreach ($paidOrders as $paidOrder) {
  1303.             foreach ($paidOrder->getProducts() as $key => $cartProduct) {
  1304.                 $product $cartProduct->getProduct();
  1305.                 $id $product->getId();
  1306.                 if( empty($products[$id]) && $product->isSalable()){
  1307.                     $products[$id]=[$product];
  1308.                     array_Push($tempArray,$product);
  1309.                 }
  1310.             }
  1311.         }
  1312.        
  1313.         return $tempArray;
  1314.     }
  1315.      /**
  1316.      * @return bool
  1317.      */
  1318.     public function getReminderCouponSent(): bool
  1319.     {
  1320.         return $this->reminderCouponSent;
  1321.     }
  1322.     /**
  1323.      * @param bool $reminderCouponSent
  1324.      * @return User
  1325.      */
  1326.     public function setReminderCouponSent(bool $reminderCouponSent): self
  1327.     {
  1328.         $this->reminderCouponSent $reminderCouponSent;
  1329.         return $this;
  1330.     }
  1331.     public function getUserSurvey(): ?UserSurvey
  1332.     {
  1333.         return $this->userSurvey;
  1334.     }
  1335.     public function setUserSurvey(UserSurvey $userSurvey): self
  1336.     {
  1337.         $this->userSurvey $userSurvey;
  1338.         // set the owning side of the relation if necessary
  1339.         if ($userSurvey->getUser() !== $this) {
  1340.             $userSurvey->setUser($this);
  1341.         }
  1342.         return $this;
  1343.     }
  1344.     public function setNextUserSurveyTime($nextUserSurveyTime)
  1345.     {
  1346.         $this->nextUserSurveyTime $nextUserSurveyTime;
  1347.     }
  1348.     public function getNextUserSurveyTime()
  1349.     {
  1350.         return $this->nextUserSurveyTime;
  1351.     }
  1352.     /*
  1353.     * @return bool
  1354.     */
  1355.     public function getDontShowSurvey(): bool
  1356.     {
  1357.         return $this->dontShowSurvey;
  1358.     }
  1359.     /**
  1360.      * @param bool $reminderCouponSent
  1361.      * @return User
  1362.      */
  1363.     public function setDontShowSurvey(bool $dontShowSurvey): self
  1364.     {
  1365.         $this->dontShowSurvey $dontShowSurvey;
  1366.         return $this;
  1367.     }
  1368.     public function getUserSubscriptionMaturin(): bool
  1369.     {
  1370.         return $this->userSubscriptionMaturin;
  1371.     }
  1372.     public function setUserSubscriptionMaturin(bool $userSubscriptionMaturin): self
  1373.     {
  1374.         $this->userSubscriptionMaturin $userSubscriptionMaturin;
  1375.         return $this;
  1376.     }
  1377.     public function getDateLogSubscriptionMaturin()
  1378.     {
  1379.         return $this->dateLogSubscriptionMaturin;
  1380.     }
  1381.     public function setDateLogSubscriptionMaturin($dateLogSubscriptionMaturin)
  1382.     {
  1383.         $this->dateLogSubscriptionMaturin $dateLogSubscriptionMaturin;
  1384.     }
  1385.     public function getSubscriptionStripeId(): ?string
  1386.     {
  1387.         return $this->subscriptionStripeId;
  1388.     }
  1389.     public function setSubscriptionStripeId($subscriptionStripeId): self
  1390.     {
  1391.         $this->subscriptionStripeId $subscriptionStripeId;
  1392.         return $this;
  1393.     }
  1394.     
  1395. }