src/OfficeBrain/Bundle/UserBundle/Entity/User.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\OfficeBrain\Bundle\UserBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Security\Core\User\UserInterface;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. use JMS\Serializer\Annotation\ExclusionPolicy;
  8. use JMS\Serializer\Annotation\Exclude;
  9. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  10. /**
  11.  * User
  12.  *
  13.  * @ORM\Table(name="tbl_user")
  14.  * @ORM\Entity(repositoryClass="App\OfficeBrain\Bundle\UserBundle\Entity\UserRepository")
  15.  * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
  16.  * @Gedmo\SoftDeleteable(fieldName="expiredAt", timeAware=false)
  17.  * @Gedmo\SoftDeleteable(fieldName="passwordRequestedAt", timeAware=false)
  18.  * @ExclusionPolicy("none")
  19.  */
  20. class User implements UserInterface, \SerializablePasswordAuthenticatedUserInterface
  21. {
  22.     /**
  23.      * @var integer
  24.      *
  25.      * @ORM\Column(name="id", type="bigint",length=20, options={"unsigned"=true})
  26.      * @ORM\Id
  27.      * @ORM\GeneratedValue(strategy="AUTO")
  28.      */
  29.     private $id;
  30.     /**
  31.      * Bidirectional (OWNING SIDE - FK)
  32.      * @ORM\ManyToOne(targetEntity="\App\OfficeBrain\Bundle\CompanyBundle\Entity\Company", inversedBy="companyUser")
  33.      * @ORM\JoinColumn(name="company_id",nullable=true)
  34.      */
  35.     protected $userCompany;
  36.     /**
  37.      * Bidirectional (OWNING SIDE - FK)
  38.      * @ORM\ManyToOne(targetEntity="\App\OfficeBrain\Bundle\UserBundle\Entity\User", inversedBy="child")
  39.      * @ORM\JoinColumn(name="parent_id", nullable=true)
  40.      */
  41.     protected $parent;
  42.     /**
  43.      * @var string
  44.      * @ORM\Column(name="login_username", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  45.      */
  46.     private $loginUsername;
  47.     /**
  48.      * @var string
  49.      * @ORM\Column(name="email", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  50.      */
  51.     private $email;
  52.     /**
  53.      * @var string
  54.      * @ORM\Column(name="password", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  55.      */
  56.     private $password;
  57.     /**
  58.      * @var string
  59.      * @ORM\Column(name="salt", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  60.      */
  61.     private $salt;
  62.     /**
  63.      * @var string
  64.      * @ORM\Column(name="gender", type="string", length=255, columnDefinition="enum('male','female','other')", options={"collate"="utf8_unicode_ci"}, nullable=true)
  65.      */
  66.     private $gender;
  67.     /**
  68.      * @var string
  69.      * @ORM\Column(name="first_name", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  70.      */
  71.     private $firstName;
  72.     /**
  73.      * @var string
  74.      * @ORM\Column(name="middle_name", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  75.      */
  76.     private $middleName;
  77.     /**
  78.      * @var string
  79.      * @ORM\Column(name="last_name", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  80.      */
  81.     private $lastName;
  82.     /**
  83.      * @var string
  84.      * @ORM\Column(name="photo", type="text", options={"collate"="utf8_unicode_ci"}, nullable=true)
  85.      */
  86.     private $photo;
  87.     /**
  88.      * @var string
  89.      * @ORM\Column(name="street1", type="text", options={"collate"="utf8_unicode_ci"}, nullable=true)
  90.      */
  91.     private $street1;
  92.     /**
  93.      * @var string
  94.      * @ORM\Column(name="street2", type="text", options={"collate"="utf8_unicode_ci"}, nullable=true)
  95.      */
  96.     private $street2;
  97.     /**
  98.      * @var integer
  99.      *
  100.      * @ORM\Column(name="country_id", type="bigint",length=20, options={"unsigned"=true}, nullable=true)
  101.      */
  102.     private $countryId;
  103.     /**
  104.      * @var integer
  105.      *
  106.      * @ORM\Column(name="state_id", type="bigint",length=20, options={"unsigned"=true}, nullable=true)
  107.      */
  108.     private $stateId;
  109.     /**
  110.      * @var integer
  111.      *
  112.      * @ORM\Column(name="city_id", type="bigint",length=20, options={"unsigned"=true}, nullable=true)
  113.      */
  114.     private $cityId;
  115.     /**
  116.      * @var string
  117.      * @ORM\Column(name="zipcode", type="string", length=50, options={"collate"="utf8_unicode_ci"}, nullable=true)
  118.      */
  119.     private $zipcode;
  120.     /**
  121.      * @var string
  122.      * @ORM\Column(name="extension", type="string", length=50, options={"collate"="utf8_unicode_ci"}, nullable=true)
  123.      */
  124.     private $extension;
  125.     /**
  126.      * @var string
  127.      * @ORM\Column(name="phone", type="string", length=50, options={"collate"="utf8_unicode_ci"}, nullable=true)
  128.      */
  129.     private $phone;
  130.     /**
  131.      * @var string
  132.      * @ORM\Column(name="mobile", type="string", length=50, options={"collate"="utf8_unicode_ci"}, nullable=true)
  133.      */
  134.     private $mobile;
  135.     /**
  136.      * @var string
  137.      * @ORM\Column(name="fax", type="string", length=50, options={"collate"="utf8_unicode_ci"}, nullable=true)
  138.      */
  139.     private $fax;
  140.     /**
  141.      * @var string
  142.      * @ORM\Column(name="website", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  143.      */
  144.     private $website;
  145.     /**
  146.      * Bidirectional (OWNING SIDE - FK)
  147.      * @Exclude
  148.      * @ORM\ManyToOne(targetEntity="\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceGroup", inversedBy="user")
  149.      * @ORM\JoinColumn(name="service_group_id", nullable=true)
  150.      */
  151.     protected $serviceGroup;
  152.     /**
  153.      * @var string
  154.      * @ORM\Column(name="fb_token", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  155.      */
  156.     private $fbToken;
  157.     /**
  158.      * @var string
  159.      * @ORM\Column(name="fb_secret_key", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  160.      */
  161.     private $fbSecretKey;
  162.     /**
  163.      * @var string
  164.      * @ORM\Column(name="gmail_token", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  165.      */
  166.     private $gmailToken;
  167.     /**
  168.      * @var string
  169.      * @ORM\Column(name="gmail_secret_key", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  170.      */
  171.     private $gmailSecretKey;
  172.     /**
  173.      * @var integer
  174.      *
  175.      * @ORM\Column(name="located_distributor_id", type="bigint",length=20, options={"unsigned"=true}, nullable=true)
  176.      */
  177.     private $locatedDistributorId;
  178.     /**
  179.      * @var boolean
  180.      * @ORM\Column(name="status", type="string", length=255, columnDefinition="enum('approve','unapprove','pending','active','inactive')", options={"collate"="utf8_unicode_ci"}, nullable=true)
  181.      */
  182.     private $status;
  183.     /**
  184.      * @var boolean
  185.      * @ORM\Column(name="locked", type="boolean", nullable=true)
  186.      */
  187.     private $locked;
  188.     /**
  189.      * @var boolean
  190.      * @ORM\Column(name="expired", type="boolean", nullable=true)
  191.      */
  192.     private $expired;
  193.     /**
  194.      * @var datetime
  195.      *
  196.      * @ORM\Column(name="expired_at",type="datetime", nullable=true)
  197.      */
  198.     protected $expiredAt;
  199.     /**
  200.      * @var string
  201.      * @ORM\Column(name="confirmation_token", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  202.      */
  203.     private $confirmationToken;
  204.     /**
  205.      * @var datetime
  206.      *
  207.      * @ORM\Column(name="password_requested_at",type="datetime", nullable=true)
  208.      */
  209.     protected $passwordRequestedAt;
  210.     /**
  211.      * @var string
  212.      * @ORM\Column(name="membership_number1", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  213.      */
  214.     private $membershipNumber1;
  215.     /**
  216.      * @var string
  217.      * @ORM\Column(name="membership_number2", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  218.      */
  219.     private $membershipNumber2;
  220.     /**
  221.      * @var string
  222.      * @ORM\Column(name="membership_number3", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  223.      */
  224.     private $membershipNumber3;
  225.     /**
  226.      * @var string
  227.      * @ORM\Column(name="membership_number4", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  228.      */
  229.     private $membershipNumber4;
  230.     /**
  231.      * @var string
  232.      * @ORM\Column(name="membership_number5", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  233.      */
  234.     private $membershipNumber5;
  235.     /**
  236.      * @var string
  237.      * @ORM\Column(name="membership_number6", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  238.      */
  239.     private $membershipNumber6;
  240.     /**
  241.      * @var string
  242.      * @ORM\Column(name="ob_customer_id", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  243.      */
  244.     private $obCustomerId;
  245.     /**
  246.      * @var string
  247.      * @ORM\Column(name="last_visited_culture", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  248.      */
  249.     private $lastVisitedCulture;
  250.     /**
  251.      * @var string
  252.      * @ORM\Column(name="job_title", type="string", length=100, options={"collate"="utf8_unicode_ci"}, nullable=true)
  253.      */
  254.     private $jobTitle;
  255.     /**
  256.      * @var boolean
  257.      * @ORM\Column(name="is_company", type="boolean", nullable=true)
  258.      */
  259.     private $isCompany;
  260.     /**
  261.      * @var boolean
  262.      * @ORM\Column(name="is_individual", type="boolean", nullable=true)
  263.      */
  264.     private $isIndividual;
  265.     /**
  266.      * @var string
  267.      * @ORM\Column(name="company_number", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  268.      */
  269.     private $companyNumber;
  270.     /**
  271.      * @var string
  272.      * @ORM\Column(name="company_name", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  273.      */
  274.     private $companyName;
  275.     /**
  276.      * @var boolean
  277.      * @ORM\Column(name="newsletters_unsubscription", type="boolean", nullable=true)
  278.      */
  279.     private $newslettersUnsubscription;
  280.     /**
  281.      * @var string
  282.      * @ORM\Column(name="instance_type", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  283.      */
  284.     private $instanceType;
  285.     /**
  286.      * @var integer
  287.      * @ORM\Column(name="instance_id", type="bigint" ,length=20 ,options={"unsigned"=true}, nullable=true)
  288.      */
  289.     private $instanceId;
  290.     /**
  291.      * @var integer
  292.      * @ORM\Column(name="erp_id", type="bigint" ,length=20 ,options={"unsigned"=true}, nullable=true)
  293.      */
  294.     private $erpId;
  295.     /**
  296.      * @var string
  297.      * @ORM\Column(name="user_type", type="string", length=100, options={"collate"="utf8_unicode_ci"}, nullable=true)
  298.      */
  299.     private $userType;
  300.     
  301.     /**
  302.      * @var string
  303.      * @ORM\Column(name="country_culture", type="string",  length=100, options={"collate"="utf8_unicode_ci"}, nullable=true)
  304.      */
  305.     private $countryCulture;
  306.     /**
  307.      * @Exclude
  308.      * @ORM\OneToMany(targetEntity="\App\OfficeBrain\Bundle\UserBundle\Entity\User", mappedBy="parent")
  309.      * @ORM\JoinColumn(nullable=true)
  310.      */
  311.     protected $child;
  312.     /**
  313.      * @Exclude
  314.      * @ORM\OneToMany(targetEntity="\App\OfficeBrain\Bundle\UserBundle\Entity\ContactBook", mappedBy="user")
  315.      * @ORM\JoinColumn(nullable=true)
  316.      */
  317.     protected $contactBook;
  318.     
  319.     /**
  320.      * @Exclude
  321.      * @ORM\OneToMany(targetEntity="\App\OfficeBrain\Bundle\UserBundle\Entity\EmployeeInfo", mappedBy="user")
  322.      * @ORM\JoinColumn(nullable=true)
  323.      */
  324.     protected $employeeInfo;
  325.     
  326.     
  327.     /**
  328.      * @Exclude
  329.      * @ORM\OneToMany(targetEntity="\App\OfficeBrain\Bundle\AccessManagementBundle\Entity\InstanceUserAccessMapping", mappedBy="user")
  330.      * @ORM\JoinColumn(nullable=true)
  331.      */
  332.     protected $instanceAccess;
  333.     /**
  334.      * @Exclude
  335.      * @ORM\OneToMany(targetEntity="\App\OfficeBrain\Bundle\CompanyBundle\Entity\Company", mappedBy="userc")
  336.      * @ORM\JoinColumn(nullable=true)
  337.      */
  338.     protected $company;
  339.     
  340.     /**
  341.      * @Exclude
  342.      * @ORM\OneToMany(targetEntity="\App\OfficeBrain\Bundle\EcatalogueBundle\Entity\Ecatalogue", mappedBy="user")
  343.      * @ORM\JoinColumn(nullable=true)
  344.      */
  345.     protected $ecatalogueUser;
  346.     /**
  347.      * @Exclude
  348.      * @ORM\OneToMany(targetEntity="\App\OfficeBrain\Bundle\EcatalogueBundle\Entity\Ecatalogue", mappedBy="supplier")
  349.      * @ORM\JoinColumn(nullable=true)
  350.      */
  351.     protected $ecatalogueSupplier;
  352.     // Start Symfony 4
  353.     /**
  354.      * @Exclude
  355.      * @ORM\OneToMany(targetEntity="\App\OfficeBrain\Bundle\PrioritizeSupplierBundle\Entity\PrioritizeSupplier", mappedBy="supplier")
  356.      * @ORM\JoinColumn(nullable=true)
  357.      */
  358.     protected $prioritysupplier;
  359.     
  360.     /**
  361.      * @ORM\OneToMany(targetEntity="\App\OfficeBrain\Bundle\PrioritizeSupplierBundle\Entity\PrioritizeSupplier", mappedBy="user")
  362.      * @ORM\JoinColumn(nullable=true)
  363.      */
  364.     protected $prioritysuppliersuer;
  365.     // End Symfony 4
  366.     /**
  367.      * @Exclude
  368.      * @ORM\OneToMany(targetEntity="\App\OfficeBrain\Bundle\CouponBundle\Entity\GreenBookMaster", mappedBy="supplierId")
  369.      * @ORM\JoinColumn(nullable=true)
  370.      */
  371.     protected $greenbookSupplier;
  372.     /**
  373.      * @var datetime
  374.      *
  375.      * @Gedmo\Timestampable(on="create")
  376.      * @ORM\Column(name="created_at",type="datetime")
  377.      */
  378.     protected $createdAt;
  379.     /**
  380.      * @var datetime
  381.      *
  382.      * @Gedmo\Timestampable(on="update")
  383.      * @ORM\Column( name="updated_at", type="datetime",nullable=true)
  384.      */
  385.     protected $updatedAt;
  386.     /**
  387.      * @var datetime
  388.      *
  389.      * @ORM\Column(name="deleted_at",type="datetime",  nullable=true)
  390.      */
  391.     protected $deletedAt;
  392.     /**
  393.      * @var integer
  394.      * @ORM\Column(name="created_uid", type="bigint" ,length=20 ,options={"unsigned"=true}, nullable=true)
  395.      */
  396.     private $createdUid;
  397.     /**
  398.      * @var integer
  399.      * @ORM\Column(name="updated_uid", type="bigint" ,length=20 ,options={"unsigned"=true}, nullable=true)
  400.      */
  401.     private $updatedUid;
  402.     /**
  403.      * @var integer
  404.      * @ORM\Column(name="deleted_uid", type="bigint" ,length=20 ,options={"unsigned"=true}, nullable=true)
  405.      */
  406.     private $deletedUid;
  407.     // Start symfony 4
  408.     /**
  409.      * @var string
  410.      * @ORM\Column(name="other_country", type="string", length=255, options={"collate"="utf8_unicode_ci"}, nullable=true)
  411.      */
  412.     private $otherCountry;
  413.     // End symfony 4
  414.     
  415.     /**
  416.      * @var string
  417.      */
  418.     public $new;
  419.     /**
  420.      * Get id
  421.      *
  422.      * @return integer
  423.      */
  424.     public function getId()
  425.     {
  426.         return $this->id;
  427.     }
  428.     /**
  429.      * Constructor
  430.      */
  431.     public function __construct()
  432.     {
  433.         $this->child = new \Doctrine\Common\Collections\ArrayCollection();
  434.         $this->user = new \Doctrine\Common\Collections\ArrayCollection();
  435.         $this->instanceAccess = new \Doctrine\Common\Collections\ArrayCollection();
  436.         $this->company = new \Doctrine\Common\Collections\ArrayCollection();
  437.     }
  438.     /**
  439.      * Get loginUsername
  440.      *
  441.      * @return string
  442.      */
  443.     public function getUsername()
  444.     {
  445.         return $this->email;
  446.     }
  447.     
  448.     /**
  449.      * Set login_username
  450.      *
  451.      * @param string $loginUsername
  452.      * @return User
  453.      */
  454.     public function setLoginUsername($loginUsername)
  455.     {
  456.         $this->loginUsername $loginUsername;
  457.         return $this;
  458.     }
  459.     /**
  460.      * Get loginUsername
  461.      *
  462.      * @return string
  463.      */
  464.     public function getLoginUsername()
  465.     {
  466.         return $this->loginUsername;
  467.     }
  468.     /**
  469.      * Set email
  470.      *
  471.      * @param string $email
  472.      * @return User
  473.      */
  474.     public function setEmail($email)
  475.     {
  476.         $this->email $email;
  477.         return $this;
  478.     }
  479.     /**
  480.      * Get email
  481.      *
  482.      * @return string
  483.      */
  484.     public function getEmail()
  485.     {
  486.         return $this->email;
  487.     }
  488.     /**
  489.      * Set password
  490.      *
  491.      * @param string $password
  492.      * @return User
  493.      */
  494.     public function setPassword(string $password): self
  495.     {
  496.         $this->password $password;
  497.         return $this;
  498.     }
  499.     /**
  500.      * Get password
  501.      * 
  502.      * @see PasswordAuthenticatedUserInterface
  503.      *
  504.      * @return string
  505.      */
  506.     public function getPassword(): string
  507.     {
  508.         return $this->password;
  509.     }
  510.     /**
  511.      * Set salt
  512.      *
  513.      * @param string $salt
  514.      * @return User
  515.      */
  516.     public function setSalt($salt)
  517.     {
  518.         $this->salt $salt;
  519.         return $this;
  520.     }
  521.     /**
  522.      * Get salt
  523.      *
  524.      * @return string
  525.      */
  526.     public function getSalt()
  527.     {
  528.         return $this->salt;
  529.     }
  530.     /**
  531.      * Set gender
  532.      *
  533.      * @param string $gender
  534.      * @return User
  535.      */
  536.     public function setGender($gender)
  537.     {
  538.         $this->gender $gender;
  539.         return $this;
  540.     }
  541.     /**
  542.      * Get gender
  543.      *
  544.      * @return string
  545.      */
  546.     public function getGender()
  547.     {
  548.         return $this->gender;
  549.     }
  550.     /**
  551.      * Set firstName
  552.      *
  553.      * @param string $firstName
  554.      * @return User
  555.      */
  556.     public function setFirstName($firstName)
  557.     {
  558.         $this->firstName $firstName;
  559.         return $this;
  560.     }
  561.     /**
  562.      * Get firstName
  563.      *
  564.      * @return string
  565.      */
  566.     public function getFirstName()
  567.     {
  568.         return $this->firstName;
  569.     }
  570.     /**
  571.      * Set lastName
  572.      *
  573.      * @param string $lastName
  574.      * @return User
  575.      */
  576.     public function setLastName($lastName)
  577.     {
  578.         $this->lastName $lastName;
  579.         return $this;
  580.     }
  581.     /**
  582.      * Get lastName
  583.      *
  584.      * @return string
  585.      */
  586.     public function getLastName()
  587.     {
  588.         return $this->lastName;
  589.     }
  590.     /**
  591.      * Set photo
  592.      *
  593.      * @param string $photo
  594.      * @return User
  595.      */
  596.     public function setPhoto($photo)
  597.     {
  598.         $this->photo $photo;
  599.         return $this;
  600.     }
  601.     /**
  602.      * Get photo
  603.      *
  604.      * @return string
  605.      */
  606.     public function getPhoto()
  607.     {
  608.         return $this->photo;
  609.     }
  610.     /**
  611.      * Set street1
  612.      *
  613.      * @param string $street1
  614.      * @return User
  615.      */
  616.     public function setStreet1($street1)
  617.     {
  618.         $this->street1 $street1;
  619.         return $this;
  620.     }
  621.     /**
  622.      * Get street1
  623.      *
  624.      * @return string
  625.      */
  626.     public function getStreet1()
  627.     {
  628.         return $this->street1;
  629.     }
  630.     /**
  631.      * Set street2
  632.      *
  633.      * @param string $street2
  634.      * @return User
  635.      */
  636.     public function setStreet2($street2)
  637.     {
  638.         $this->street2 $street2;
  639.         return $this;
  640.     }
  641.     /**
  642.      * Get street2
  643.      *
  644.      * @return string
  645.      */
  646.     public function getStreet2()
  647.     {
  648.         return $this->street2;
  649.     }
  650.     /**
  651.      * Set countryId
  652.      *
  653.      * @param integer $countryId
  654.      * @return User
  655.      */
  656.     public function setCountryId($countryId)
  657.     {
  658.         $this->countryId $countryId;
  659.         return $this;
  660.     }
  661.     /**
  662.      * Get countryId
  663.      *
  664.      * @return integer
  665.      */
  666.     public function getCountryId()
  667.     {
  668.         return $this->countryId;
  669.     }
  670.     /**
  671.      * Set stateId
  672.      *
  673.      * @param integer $stateId
  674.      * @return User
  675.      */
  676.     public function setStateId($stateId)
  677.     {
  678.         $this->stateId $stateId;
  679.         return $this;
  680.     }
  681.     /**
  682.      * Get stateId
  683.      *
  684.      * @return integer
  685.      */
  686.     public function getStateId()
  687.     {
  688.         return $this->stateId;
  689.     }
  690.     /**
  691.      * Set cityId
  692.      *
  693.      * @param integer $cityId
  694.      * @return User
  695.      */
  696.     public function setCityId($cityId)
  697.     {
  698.         $this->cityId $cityId;
  699.         return $this;
  700.     }
  701.     /**
  702.      * Get cityId
  703.      *
  704.      * @return integer
  705.      */
  706.     public function getCityId()
  707.     {
  708.         return $this->cityId;
  709.     }
  710.     /**
  711.      * Set zipcode
  712.      *
  713.      * @param string $zipcode
  714.      * @return User
  715.      */
  716.     public function setZipcode($zipcode)
  717.     {
  718.         $this->zipcode $zipcode;
  719.         return $this;
  720.     }
  721.     /**
  722.      * Get zipcode
  723.      *
  724.      * @return string
  725.      */
  726.     public function getZipcode()
  727.     {
  728.         return $this->zipcode;
  729.     }
  730.     /**
  731.      * Set extension
  732.      *
  733.      * @param string $extension
  734.      * @return User
  735.      */
  736.     public function setExtension($extension)
  737.     {
  738.         $this->extension $extension;
  739.         return $this;
  740.     }
  741.     /**
  742.      * Get extension
  743.      *
  744.      * @return string
  745.      */
  746.     public function getExtension()
  747.     {
  748.         return $this->extension;
  749.     }
  750.     /**
  751.      * Set phone
  752.      *
  753.      * @param string $phone
  754.      * @return User
  755.      */
  756.     public function setPhone($phone)
  757.     {
  758.         $this->phone $phone;
  759.         return $this;
  760.     }
  761.     /**
  762.      * Get phone
  763.      *
  764.      * @return string
  765.      */
  766.     public function getPhone()
  767.     {
  768.         return $this->phone;
  769.     }
  770.     /**
  771.      * Set mobile
  772.      *
  773.      * @param string $mobile
  774.      * @return User
  775.      */
  776.     public function setMobile($mobile)
  777.     {
  778.         $this->mobile $mobile;
  779.         return $this;
  780.     }
  781.     /**
  782.      * Get mobile
  783.      *
  784.      * @return string
  785.      */
  786.     public function getMobile()
  787.     {
  788.         return $this->mobile;
  789.     }
  790.     /**
  791.      * Set fax
  792.      *
  793.      * @param string $fax
  794.      * @return User
  795.      */
  796.     public function setFax($fax)
  797.     {
  798.         $this->fax $fax;
  799.         return $this;
  800.     }
  801.     /**
  802.      * Get fax
  803.      *
  804.      * @return string
  805.      */
  806.     public function getFax()
  807.     {
  808.         return $this->fax;
  809.     }
  810.     /**
  811.      * Set website
  812.      *
  813.      * @param string $website
  814.      * @return User
  815.      */
  816.     public function setWebsite($website)
  817.     {
  818.         $this->website $website;
  819.         return $this;
  820.     }
  821.     /**
  822.      * Get website
  823.      *
  824.      * @return string
  825.      */
  826.     public function getWebsite()
  827.     {
  828.         return $this->website;
  829.     }
  830.     /**
  831.      * Set fbToken
  832.      *
  833.      * @param string $fbToken
  834.      * @return User
  835.      */
  836.     public function setFbToken($fbToken)
  837.     {
  838.         $this->fbToken $fbToken;
  839.         return $this;
  840.     }
  841.     /**
  842.      * Get fbToken
  843.      *
  844.      * @return string
  845.      */
  846.     public function getFbToken()
  847.     {
  848.         return $this->fbToken;
  849.     }
  850.     /**
  851.      * Set fbSecretKey
  852.      *
  853.      * @param string $fbSecretKey
  854.      * @return User
  855.      */
  856.     public function setFbSecretKey($fbSecretKey)
  857.     {
  858.         $this->fbSecretKey $fbSecretKey;
  859.         return $this;
  860.     }
  861.     /**
  862.      * Get fbSecretKey
  863.      *
  864.      * @return string
  865.      */
  866.     public function getFbSecretKey()
  867.     {
  868.         return $this->fbSecretKey;
  869.     }
  870.     /**
  871.      * Set gmailToken
  872.      *
  873.      * @param string $gmailToken
  874.      * @return User
  875.      */
  876.     public function setGmailToken($gmailToken)
  877.     {
  878.         $this->gmailToken $gmailToken;
  879.         return $this;
  880.     }
  881.     /**
  882.      * Get gmailToken
  883.      *
  884.      * @return string
  885.      */
  886.     public function getGmailToken()
  887.     {
  888.         return $this->gmailToken;
  889.     }
  890.     /**
  891.      * Set gmailSecretKey
  892.      *
  893.      * @param string $gmailSecretKey
  894.      * @return User
  895.      */
  896.     public function setGmailSecretKey($gmailSecretKey)
  897.     {
  898.         $this->gmailSecretKey $gmailSecretKey;
  899.         return $this;
  900.     }
  901.     /**
  902.      * Get gmailSecretKey
  903.      *
  904.      * @return string
  905.      */
  906.     public function getGmailSecretKey()
  907.     {
  908.         return $this->gmailSecretKey;
  909.     }
  910.     /**
  911.      * Set locatedDistributorId
  912.      *
  913.      * @param integer $locatedDistributorId
  914.      * @return User
  915.      */
  916.     public function setLocatedDistributorId($locatedDistributorId)
  917.     {
  918.         $this->locatedDistributorId $locatedDistributorId;
  919.         return $this;
  920.     }
  921.     /**
  922.      * Get locatedDistributorId
  923.      *
  924.      * @return integer
  925.      */
  926.     public function getLocatedDistributorId()
  927.     {
  928.         return $this->locatedDistributorId;
  929.     }
  930.     /**
  931.      * Set status
  932.      *
  933.      * @param boolean $status
  934.      * @return User
  935.      */
  936.     public function setStatus($status)
  937.     {
  938.         $this->status $status;
  939.         return $this;
  940.     }
  941.     /**
  942.      * Get status
  943.      *
  944.      * @return boolean
  945.      */
  946.     public function getStatus()
  947.     {
  948.         return $this->status;
  949.     }
  950.     /**
  951.      * Set locked
  952.      *
  953.      * @param boolean $locked
  954.      * @return User
  955.      */
  956.     public function setLocked($locked)
  957.     {
  958.         $this->locked $locked;
  959.         return $this;
  960.     }
  961.     /**
  962.      * Get locked
  963.      *
  964.      * @return boolean
  965.      */
  966.     public function getLocked()
  967.     {
  968.         return $this->locked;
  969.     }
  970.     /**
  971.      * Set expired
  972.      *
  973.      * @param boolean $expired
  974.      * @return User
  975.      */
  976.     public function setExpired($expired)
  977.     {
  978.         $this->expired $expired;
  979.         return $this;
  980.     }
  981.     /**
  982.      * Get expired
  983.      *
  984.      * @return boolean
  985.      */
  986.     public function getExpired()
  987.     {
  988.         return $this->expired;
  989.     }
  990.     /**
  991.      * Set expiredAt
  992.      *
  993.      * @param \DateTime $expiredAt
  994.      * @return User
  995.      */
  996.     public function setExpiredAt($expiredAt)
  997.     {
  998.         $this->expiredAt $expiredAt;
  999.         return $this;
  1000.     }
  1001.     /**
  1002.      * Get expiredAt
  1003.      *
  1004.      * @return \DateTime
  1005.      */
  1006.     public function getExpiredAt()
  1007.     {
  1008.         return $this->expiredAt;
  1009.     }
  1010.     /**
  1011.      * Set confirmationToken
  1012.      *
  1013.      * @param string $confirmationToken
  1014.      * @return User
  1015.      */
  1016.     public function setConfirmationToken($confirmationToken)
  1017.     {
  1018.         $this->confirmationToken $confirmationToken;
  1019.         return $this;
  1020.     }
  1021.     /**
  1022.      * Get confirmationToken
  1023.      *
  1024.      * @return string
  1025.      */
  1026.     public function getConfirmationToken()
  1027.     {
  1028.         return $this->confirmationToken;
  1029.     }
  1030.     /**
  1031.      * Set passwordRequestedAt
  1032.      *
  1033.      * @param \DateTime $passwordRequestedAt
  1034.      * @return User
  1035.      */
  1036.     public function setPasswordRequestedAt($passwordRequestedAt)
  1037.     {
  1038.         $this->passwordRequestedAt $passwordRequestedAt;
  1039.         return $this;
  1040.     }
  1041.     /**
  1042.      * Get passwordRequestedAt
  1043.      *
  1044.      * @return \DateTime
  1045.      */
  1046.     public function getPasswordRequestedAt()
  1047.     {
  1048.         return $this->passwordRequestedAt;
  1049.     }
  1050.     /**
  1051.      * Set jobTitle
  1052.      *
  1053.      * @param string $jobTitle
  1054.      * @return User
  1055.      */
  1056.     public function setJobTitle($jobTitle)
  1057.     {
  1058.         $this->jobTitle $jobTitle;
  1059.         return $this;
  1060.     }
  1061.     /**
  1062.      * Get jobTitle
  1063.      *
  1064.      * @return string
  1065.      */
  1066.     public function getJobTitle()
  1067.     {
  1068.         return $this->jobTitle;
  1069.     }
  1070.     /**
  1071.      * Set isCompany
  1072.      *
  1073.      * @param boolean $isCompany
  1074.      * @return User
  1075.      */
  1076.     public function setIsCompany($isCompany)
  1077.     {
  1078.         $this->isCompany $isCompany;
  1079.         return $this;
  1080.     }
  1081.     /**
  1082.      * Get isCompany
  1083.      *
  1084.      * @return boolean
  1085.      */
  1086.     public function getIsCompany()
  1087.     {
  1088.         return $this->isCompany;
  1089.     }
  1090.     /**
  1091.      * Set isIndividual
  1092.      *
  1093.      * @param boolean $isIndividual
  1094.      * @return User
  1095.      */
  1096.     public function setIsIndividual($isIndividual)
  1097.     {
  1098.         $this->isIndividual $isIndividual;
  1099.         return $this;
  1100.     }
  1101.     /**
  1102.      * Get isIndividual
  1103.      *
  1104.      * @return boolean
  1105.      */
  1106.     public function getIsIndividual()
  1107.     {
  1108.         return $this->isIndividual;
  1109.     }
  1110.     /**
  1111.      * Set newslettersUnsubscription
  1112.      *
  1113.      * @param boolean $newslettersUnsubscription
  1114.      * @return User
  1115.      */
  1116.     public function setNewslettersUnsubscription($newslettersUnsubscription)
  1117.     {
  1118.         $this->newslettersUnsubscription $newslettersUnsubscription;
  1119.         return $this;
  1120.     }
  1121.     /**
  1122.      * Get newslettersUnsubscription
  1123.      *
  1124.      * @return boolean
  1125.      */
  1126.     public function getNewslettersUnsubscription()
  1127.     {
  1128.         return $this->newslettersUnsubscription;
  1129.     }
  1130.     /**
  1131.      * Set instanceType
  1132.      *
  1133.      * @param string $instanceType
  1134.      * @return User
  1135.      */
  1136.     public function setInstanceType($instanceType)
  1137.     {
  1138.         $this->instanceType $instanceType;
  1139.         return $this;
  1140.     }
  1141.     /**
  1142.      * Get instanceType
  1143.      *
  1144.      * @return string
  1145.      */
  1146.     public function getInstanceType()
  1147.     {
  1148.         return $this->instanceType;
  1149.     }
  1150.     /**
  1151.      * Set instanceTypeId
  1152.      *
  1153.      * @param integer $instanceTypeId
  1154.      * @return User
  1155.      */
  1156.     public function setInstanceId($instanceId)
  1157.     {
  1158.         $this->instanceId $instanceId;
  1159.         return $this;
  1160.     }
  1161.     /**
  1162.      * Get instanceTypeId
  1163.      *
  1164.      * @return integer
  1165.      */
  1166.     public function getInstanceId()
  1167.     {
  1168.         return $this->instanceId;
  1169.     }
  1170.     /**
  1171.      * Set erpId
  1172.      *
  1173.      * @param integer $erpId
  1174.      * @return User
  1175.      */
  1176.     public function setErpId($erpId)
  1177.     {
  1178.         $this->erpId $erpId;
  1179.         return $this;
  1180.     }
  1181.     /**
  1182.      * Get erpId
  1183.      *
  1184.      * @return integer
  1185.      */
  1186.     public function getErpId()
  1187.     {
  1188.         return $this->erpId;
  1189.     }
  1190.     /**
  1191.      * Set userType
  1192.      *
  1193.      * @param string $userType
  1194.      * @return User
  1195.      */
  1196.     public function setUserType($userType)
  1197.     {
  1198.         $this->userType $userType;
  1199.         return $this;
  1200.     }
  1201.     /**
  1202.      * Get userType
  1203.      *
  1204.      * @return string
  1205.      */
  1206.     public function getUserType()
  1207.     {
  1208.         return $this->userType;
  1209.     }
  1210.     /**
  1211.      * Set createdAt
  1212.      *
  1213.      * @param \DateTime $createdAt
  1214.      * @return User
  1215.      */
  1216.     public function setCreatedAt($createdAt)
  1217.     {
  1218.         $this->createdAt $createdAt;
  1219.         return $this;
  1220.     }
  1221.     /**
  1222.      * Get createdAt
  1223.      *
  1224.      * @return \DateTime
  1225.      */
  1226.     public function getCreatedAt()
  1227.     {
  1228.         return $this->createdAt;
  1229.     }
  1230.     /**
  1231.      * Set updatedAt
  1232.      *
  1233.      * @param \DateTime $updatedAt
  1234.      * @return User
  1235.      */
  1236.     public function setUpdatedAt($updatedAt)
  1237.     {
  1238.         $this->updatedAt $updatedAt;
  1239.         return $this;
  1240.     }
  1241.     /**
  1242.      * Get updatedAt
  1243.      *
  1244.      * @return \DateTime
  1245.      */
  1246.     public function getUpdatedAt()
  1247.     {
  1248.         return $this->updatedAt;
  1249.     }
  1250.     /**
  1251.      * Set deletedAt
  1252.      *
  1253.      * @param \DateTime $deletedAt
  1254.      * @return User
  1255.      */
  1256.     public function setDeletedAt($deletedAt)
  1257.     {
  1258.         $this->deletedAt $deletedAt;
  1259.         return $this;
  1260.     }
  1261.     /**
  1262.      * Get deletedAt
  1263.      *
  1264.      * @return \DateTime
  1265.      */
  1266.     public function getDeletedAt()
  1267.     {
  1268.         return $this->deletedAt;
  1269.     }
  1270.     /**
  1271.      * Set createdUid
  1272.      *
  1273.      * @param integer $createdUid
  1274.      * @return User
  1275.      */
  1276.     public function setCreatedUid($createdUid)
  1277.     {
  1278.         $this->createdUid $createdUid;
  1279.         return $this;
  1280.     }
  1281.     /**
  1282.      * Get createdUid
  1283.      *
  1284.      * @return integer
  1285.      */
  1286.     public function getCreatedUid()
  1287.     {
  1288.         return $this->createdUid;
  1289.     }
  1290.     /**
  1291.      * Set updatedUid
  1292.      *
  1293.      * @param integer $updatedUid
  1294.      * @return User
  1295.      */
  1296.     public function setUpdatedUid($updatedUid)
  1297.     {
  1298.         $this->updatedUid $updatedUid;
  1299.         return $this;
  1300.     }
  1301.     /**
  1302.      * Get updatedUid
  1303.      *
  1304.      * @return integer
  1305.      */
  1306.     public function getUpdatedUid()
  1307.     {
  1308.         return $this->updatedUid;
  1309.     }
  1310.     /**
  1311.      * Set deletedUid
  1312.      *
  1313.      * @param integer $deletedUid
  1314.      * @return User
  1315.      */
  1316.     public function setDeletedUid($deletedUid)
  1317.     {
  1318.         $this->deletedUid $deletedUid;
  1319.         return $this;
  1320.     }
  1321.     /**
  1322.      * Get deletedUid
  1323.      *
  1324.      * @return integer
  1325.      */
  1326.     public function getDeletedUid()
  1327.     {
  1328.         return $this->deletedUid;
  1329.     }
  1330.     /**
  1331.      * Set userCompany
  1332.      *
  1333.      * @param \App\OfficeBrain\Bundle\CompanyBundle\Entity\Company $userCompany
  1334.      * @return User
  1335.      */
  1336.     public function setUserCompany(\App\OfficeBrain\Bundle\CompanyBundle\Entity\Company $userCompany null)
  1337.     {
  1338.         $this->userCompany $userCompany;
  1339.         return $this;
  1340.     }
  1341.     /**
  1342.      * Get userCompany
  1343.      *
  1344.      * @return \App\OfficeBrain\Bundle\CompanyBundle\Entity\Company
  1345.      */
  1346.     public function getUserCompany()
  1347.     {
  1348.         return $this->userCompany;
  1349.     }
  1350.     /**
  1351.      * Set serviceGroup
  1352.      *
  1353.      * @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceGroup $serviceGroup
  1354.      * @return User
  1355.      */
  1356.     public function setServiceGroup($serviceGroup null)
  1357.     {
  1358.         $this->serviceGroup $serviceGroup;
  1359.         return $this;
  1360.     }
  1361.     /**
  1362.      * Get serviceGroup
  1363.      *
  1364.      * @return \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceGroup
  1365.      */
  1366.     public function getServiceGroup()
  1367.     {
  1368.         return $this->serviceGroup;
  1369.     }
  1370.     /**
  1371.      * Add child
  1372.      *
  1373.      * @param \App\OfficeBrain\Bundle\UserBundle\Entity\User $child
  1374.      * @return User
  1375.      */
  1376.     public function addChild(\App\OfficeBrain\Bundle\UserBundle\Entity\User $child)
  1377.     {
  1378.         $this->child[] = $child;
  1379.         return $this;
  1380.     }
  1381.     /**
  1382.      * Remove child
  1383.      *
  1384.      * @param \App\OfficeBrain\Bundle\UserBundle\Entity\User $child
  1385.      */
  1386.     public function removeChild(\App\OfficeBrain\Bundle\UserBundle\Entity\User $child)
  1387.     {
  1388.         $this->child->removeElement($child);
  1389.     }
  1390.     /**
  1391.      * Get child
  1392.      *
  1393.      * @return \Doctrine\Common\Collections\Collection
  1394.      */
  1395.     public function getChild()
  1396.     {
  1397.         return $this->child;
  1398.     }
  1399.     /**
  1400.      * Add user
  1401.      *
  1402.      * @param \App\OfficeBrain\Bundle\UserBundle\Entity\ContactBook $user
  1403.      * @return User
  1404.      */
  1405.     public function addUser(\App\OfficeBrain\Bundle\UserBundle\Entity\ContactBook $user)
  1406.     {
  1407.         $this->user[] = $user;
  1408.         return $this;
  1409.     }
  1410.     /**
  1411.      * Remove user
  1412.      *
  1413.      * @param \App\OfficeBrain\Bundle\UserBundle\Entity\ContactBook $user
  1414.      */
  1415.     public function removeUser(\App\OfficeBrain\Bundle\UserBundle\Entity\ContactBook $user)
  1416.     {
  1417.         $this->user->removeElement($user);
  1418.     }
  1419.     /**
  1420.      * Get user
  1421.      *
  1422.      * @return \Doctrine\Common\Collections\Collection
  1423.      */
  1424.     public function getUser()
  1425.     {
  1426.         return $this->user;
  1427.     }
  1428.     /**
  1429.      * Add instanceAccess
  1430.      *
  1431.      * @param \App\OfficeBrain\Bundle\AccessManagementBundle\Entity\InstanceUserAccessMapping $instanceAccess
  1432.      * @return User
  1433.      */
  1434.     public function addInstanceAccess(\App\OfficeBrain\Bundle\AccessManagementBundle\Entity\InstanceUserAccessMapping $instanceAccess)
  1435.     {
  1436.         $this->instanceAccess[] = $instanceAccess;
  1437.         return $this;
  1438.     }
  1439.     /**
  1440.      * Remove instanceAccess
  1441.      *
  1442.      * @param \App\OfficeBrain\Bundle\AccessManagementBundle\Entity\InstanceUserAccessMapping $instanceAccess
  1443.      */
  1444.     public function removeInstanceAccess(\App\OfficeBrain\Bundle\AccessManagementBundle\Entity\InstanceUserAccessMapping $instanceAccess)
  1445.     {
  1446.         $this->instanceAccess->removeElement($instanceAccess);
  1447.     }
  1448.     /**
  1449.      * Get instanceAccess
  1450.      *
  1451.      * @return \Doctrine\Common\Collections\Collection
  1452.      */
  1453.     public function getInstanceAccess()
  1454.     {
  1455.         return $this->instanceAccess;
  1456.     }
  1457.     /**
  1458.      * Add company
  1459.      *
  1460.      * @param \App\OfficeBrain\Bundle\CompanyBundle\Entity\Company $company
  1461.      * @return User
  1462.      */
  1463.     public function addCompany(\App\OfficeBrain\Bundle\CompanyBundle\Entity\Company $company)
  1464.     {
  1465.         $this->company[] = $company;
  1466.         return $this;
  1467.     }
  1468.     /**
  1469.      * Remove company
  1470.      *
  1471.      * @param \App\OfficeBrain\Bundle\CompanyBundle\Entity\Company $company
  1472.      */
  1473.     public function removeCompany(\App\OfficeBrain\Bundle\CompanyBundle\Entity\Company $company)
  1474.     {
  1475.         $this->company->removeElement($company);
  1476.     }
  1477.     /**
  1478.      * Get company
  1479.      *
  1480.      * @return \Doctrine\Common\Collections\Collection
  1481.      */
  1482.     public function getCompany()
  1483.     {
  1484.         return $this->company;
  1485.     }
  1486.     /**
  1487.      * Set middleName
  1488.      *
  1489.      * @param string $middleName
  1490.      * @return User
  1491.      */
  1492.     public function setMiddleName($middleName)
  1493.     {
  1494.         $this->middleName $middleName;
  1495.         return $this;
  1496.     }
  1497.     /**
  1498.      * Get middleName
  1499.      *
  1500.      * @return string
  1501.      */
  1502.     public function getMiddleName()
  1503.     {
  1504.         return $this->middleName;
  1505.     }
  1506.     /**
  1507.      * Set companyNumber
  1508.      *
  1509.      * @param string $companyNumber
  1510.      * @return User
  1511.      */
  1512.     public function setCompanyNumber($companyNumber)
  1513.     {
  1514.         $this->companyNumber $companyNumber;
  1515.         return $this;
  1516.     }
  1517.     /**
  1518.      * Get companyNumber
  1519.      *
  1520.      * @return string
  1521.      */
  1522.     public function getCompanyNumber()
  1523.     {
  1524.         return $this->companyNumber;
  1525.     }
  1526.     /**
  1527.      * Add contactBook
  1528.      *
  1529.      * @param \App\OfficeBrain\Bundle\UserBundle\Entity\ContactBook $contactBook
  1530.      * @return User
  1531.      */
  1532.     public function addContactBook(\App\OfficeBrain\Bundle\UserBundle\Entity\ContactBook $contactBook)
  1533.     {
  1534.         $this->contactBook[] = $contactBook;
  1535.         return $this;
  1536.     }
  1537.     /**
  1538.      * Remove contactBook
  1539.      *
  1540.      * @param \App\OfficeBrain\Bundle\UserBundle\Entity\ContactBook $contactBook
  1541.      */
  1542.     public function removeContactBook(\App\OfficeBrain\Bundle\UserBundle\Entity\ContactBook $contactBook)
  1543.     {
  1544.         $this->contactBook->removeElement($contactBook);
  1545.     }
  1546.     /**
  1547.      * Get contactBook
  1548.      *
  1549.      * @return \Doctrine\Common\Collections\Collection
  1550.      */
  1551.     public function getContactBook()
  1552.     {
  1553.         return $this->contactBook;
  1554.     }
  1555.     /**
  1556.      * Set membershipNumber1
  1557.      *
  1558.      * @param string $membershipNumber1
  1559.      * @return User
  1560.      */
  1561.     public function setMembershipNumber1($membershipNumber1)
  1562.     {
  1563.         $this->membershipNumber1 $membershipNumber1;
  1564.         return $this;
  1565.     }
  1566.     /**
  1567.      * Get membershipNumber1
  1568.      *
  1569.      * @return string
  1570.      */
  1571.     public function getMembershipNumber1()
  1572.     {
  1573.         return $this->membershipNumber1;
  1574.     }
  1575.     /**
  1576.      * Set membershipNumber2
  1577.      *
  1578.      * @param string $membershipNumber2
  1579.      * @return User
  1580.      */
  1581.     public function setMembershipNumber2($membershipNumber2)
  1582.     {
  1583.         $this->membershipNumber2 $membershipNumber2;
  1584.         return $this;
  1585.     }
  1586.     /**
  1587.      * Get membershipNumber2
  1588.      *
  1589.      * @return string
  1590.      */
  1591.     public function getMembershipNumber2()
  1592.     {
  1593.         return $this->membershipNumber2;
  1594.     }
  1595.     /**
  1596.      * Set membershipNumber3
  1597.      *
  1598.      * @param string $membershipNumber3
  1599.      * @return User
  1600.      */
  1601.     public function setMembershipNumber3($membershipNumber3)
  1602.     {
  1603.         $this->membershipNumber3 $membershipNumber3;
  1604.         return $this;
  1605.     }
  1606.     /**
  1607.      * Get membershipNumber3
  1608.      *
  1609.      * @return string
  1610.      */
  1611.     public function getMembershipNumber3()
  1612.     {
  1613.         return $this->membershipNumber3;
  1614.     }
  1615.     /**
  1616.      * Set membershipNumber4
  1617.      *
  1618.      * @param string $membershipNumber4
  1619.      * @return User
  1620.      */
  1621.     public function setMembershipNumber4($membershipNumber4)
  1622.     {
  1623.         $this->membershipNumber4 $membershipNumber4;
  1624.         return $this;
  1625.     }
  1626.     /**
  1627.      * Get membershipNumber4
  1628.      *
  1629.      * @return string
  1630.      */
  1631.     public function getMembershipNumber4()
  1632.     {
  1633.         return $this->membershipNumber4;
  1634.     }
  1635.     /**
  1636.      * Set membershipNumber5
  1637.      *
  1638.      * @param string $membershipNumber5
  1639.      * @return User
  1640.      */
  1641.     public function setMembershipNumber5($membershipNumber5)
  1642.     {
  1643.         $this->membershipNumber5 $membershipNumber5;
  1644.         return $this;
  1645.     }
  1646.     /**
  1647.      * Get membershipNumber5
  1648.      *
  1649.      * @return string
  1650.      */
  1651.     public function getMembershipNumber5()
  1652.     {
  1653.         return $this->membershipNumber5;
  1654.     }
  1655.     /**
  1656.      * Set membershipNumber6
  1657.      *
  1658.      * @param string $membershipNumber6
  1659.      * @return User
  1660.      */
  1661.     public function setMembershipNumber6($membershipNumber6)
  1662.     {
  1663.         $this->membershipNumber6 $membershipNumber6;
  1664.         return $this;
  1665.     }
  1666.     /**
  1667.      * Get membershipNumber6
  1668.      *
  1669.      * @return string
  1670.      */
  1671.     public function getMembershipNumber6()
  1672.     {
  1673.         return $this->membershipNumber6;
  1674.     }
  1675.       /**
  1676.      * @inheritDoc
  1677.      */
  1678.     public function getRoles()
  1679.     {
  1680.         if($this->userType=='end_user' || $this->userType=='distributor') { 
  1681.             return array('ROLE_ANONYMOUS');
  1682.         }
  1683.         else {
  1684.             return array('ROLE_ADMINISTRATOR');
  1685.         }
  1686.     }
  1687.     /**
  1688.      * @inheritDoc
  1689.      */
  1690.     public function eraseCredentials()
  1691.     {
  1692.     }
  1693.     /**
  1694.      * @see \Serializable::serialize()
  1695.      */
  1696.     public function serialize()
  1697.     {
  1698.         return serialize(array(
  1699.                 $this->id,
  1700.                 $this->email,
  1701.                 $this->password,
  1702.                 // see section on salt below
  1703.                 // $this->salt,
  1704.         ));
  1705.     }
  1706.     /**
  1707.      * @see \Serializable::unserialize()
  1708.      */
  1709.     public function unserialize($serialized)
  1710.     {
  1711.         list(
  1712.                 $this->id,
  1713.                 $this->email,
  1714.                 $this->password,
  1715.                 // see section on salt below
  1716.                 // $this->salt
  1717.         ) = unserialize($serialized);
  1718.     }
  1719.     public function isAccountNonExpired()
  1720.     {
  1721.         return $this->expiredAt!==1;
  1722.     }
  1723.     public function isAccountNonLocked()
  1724.     {
  1725.         return $this->locked!==1;
  1726.     }
  1727.     public function isCredentialsNonExpired()
  1728.     {
  1729.         return true;
  1730.     }
  1731.     public function isEnabled()
  1732.     {
  1733.         return $this->status==='active';
  1734.     }
  1735.     /**
  1736.      * Set obCustomerId
  1737.      *
  1738.      * @param string $obCustomerId
  1739.      * @return User
  1740.      */
  1741.     public function setObCustomerId($obCustomerId)
  1742.     {
  1743.         $this->obCustomerId $obCustomerId;
  1744.         return $this;
  1745.     }
  1746.     /**
  1747.      * Get obCustomerId
  1748.      *
  1749.      * @return string
  1750.      */
  1751.     public function getObCustomerId()
  1752.     {
  1753.         return $this->obCustomerId;
  1754.     }
  1755.     /**
  1756.      * Set lastVisitedCulture
  1757.      *
  1758.      * @param string $lastVisitedCulture
  1759.      * @return User
  1760.      */
  1761.     public function setLastVisitedCulture($lastVisitedCulture)
  1762.     {
  1763.         $this->lastVisitedCulture $lastVisitedCulture;
  1764.         return $this;
  1765.     }
  1766.     /**
  1767.      * Get lastVisitedCulture
  1768.      *
  1769.      * @return string
  1770.      */
  1771.     public function getLastVisitedCulture()
  1772.     {
  1773.         return $this->lastVisitedCulture;
  1774.     }
  1775.     /**
  1776.      * Set companyName
  1777.      *
  1778.      * @param string $companyName
  1779.      * @return User
  1780.      */
  1781.     public function setCompanyName($companyName)
  1782.     {
  1783.         $this->companyName $companyName;
  1784.         return $this;
  1785.     }
  1786.     /**
  1787.      * Get companyName
  1788.      *
  1789.      * @return string
  1790.      */
  1791.     public function getCompanyName()
  1792.     {
  1793.         return $this->companyName;
  1794.     }
  1795.     /**
  1796.      * Get user full name
  1797.      *
  1798.      * @return string
  1799.      */
  1800.     public function getFullName()
  1801.     {
  1802.         return $this->firstName.' '.$this->lastName;
  1803.     }
  1804.     
  1805.     /**
  1806.      * Add ecatalogueUser
  1807.      *
  1808.      * @param \App\OfficeBrain\Bundle\EcatalogueBundle\Entity\Ecatalogue $ecatalogueUser
  1809.      * @return User
  1810.      */
  1811.     public function addEcatalogueUser(\App\OfficeBrain\Bundle\EcatalogueBundle\Entity\Ecatalogue $ecatalogueUser)
  1812.     {
  1813.         $this->ecatalogueUser[] = $ecatalogueUser;
  1814.         return $this;
  1815.     }
  1816.     /**
  1817.      * Remove ecatalogueUser
  1818.      *
  1819.      * @param \App\OfficeBrain\Bundle\EcatalogueBundle\Entity\Ecatalogue $ecatalogueUser
  1820.      */
  1821.     public function removeEcatalogueUser(\App\OfficeBrain\Bundle\EcatalogueBundle\Entity\Ecatalogue $ecatalogueUser)
  1822.     {
  1823.         $this->ecatalogueUser->removeElement($ecatalogueUser);
  1824.     }
  1825.     /**
  1826.      * Get ecatalogueUser
  1827.      *
  1828.      * @return \Doctrine\Common\Collections\Collection 
  1829.      */
  1830.     public function getEcatalogueUser()
  1831.     {
  1832.         return $this->ecatalogueUser;
  1833.     }
  1834.     /**
  1835.      * Add ecatalogueSupplier
  1836.      *
  1837.      * @param \App\OfficeBrain\Bundle\EcatalogueBundle\Entity\Ecatalogue $ecatalogueSupplier
  1838.      * @return User
  1839.      */
  1840.     public function addEcatalogueSupplier(\App\OfficeBrain\Bundle\EcatalogueBundle\Entity\Ecatalogue $ecatalogueSupplier)
  1841.     {
  1842.         $this->ecatalogueSupplier[] = $ecatalogueSupplier;
  1843.         return $this;
  1844.     }
  1845.     /**
  1846.      * Remove ecatalogueSupplier
  1847.      *
  1848.      * @param \App\OfficeBrain\Bundle\EcatalogueBundle\Entity\Ecatalogue $ecatalogueSupplier
  1849.      */
  1850.     public function removeEcatalogueSupplier(\App\OfficeBrain\Bundle\EcatalogueBundle\Entity\Ecatalogue $ecatalogueSupplier)
  1851.     {
  1852.         $this->ecatalogueSupplier->removeElement($ecatalogueSupplier);
  1853.     }
  1854.     /**
  1855.      * Get ecatalogueSupplier
  1856.      *
  1857.      * @return \Doctrine\Common\Collections\Collection 
  1858.      */
  1859.     public function getEcatalogueSupplier()
  1860.     {
  1861.         return $this->ecatalogueSupplier;
  1862.     }
  1863.     /**
  1864.      * Set parent
  1865.      *
  1866.      * @param \App\OfficeBrain\Bundle\UserBundle\Entity\User $parent
  1867.      * @return User
  1868.      */
  1869.     public function setParent(\App\OfficeBrain\Bundle\UserBundle\Entity\User $parent null)
  1870.     {
  1871.         $this->parent $parent;
  1872.         return $this;
  1873.     }
  1874.     /**
  1875.      * Get parent
  1876.      *
  1877.      * @return \App\OfficeBrain\Bundle\UserBundle\Entity\User 
  1878.      */
  1879.     public function getParent()
  1880.     {
  1881.         return $this->parent;
  1882.     }
  1883.     /**
  1884.      * Set countryCulture
  1885.      *
  1886.      * @param string $countryCulture
  1887.      *
  1888.      * @return User
  1889.      */
  1890.     public function setCountryCulture($countryCulture)
  1891.     {
  1892.         $this->countryCulture $countryCulture;
  1893.         return $this;
  1894.     }
  1895.     /**
  1896.      * Get countryCulture
  1897.      *
  1898.      * @return string
  1899.      */
  1900.     public function getCountryCulture()
  1901.     {
  1902.         return $this->countryCulture;
  1903.     }
  1904.     /**
  1905.      * Add employeeInfo
  1906.      *
  1907.      * @param \App\OfficeBrain\Bundle\UserBundle\Entity\EmployeeInfo $employeeInfo
  1908.      *
  1909.      * @return User
  1910.      */
  1911.     public function addEmployeeInfo(\App\OfficeBrain\Bundle\UserBundle\Entity\EmployeeInfo $employeeInfo)
  1912.     {
  1913.         $this->employeeInfo[] = $employeeInfo;
  1914.         return $this;
  1915.     }
  1916.     /**
  1917.      * Remove employeeInfo
  1918.      *
  1919.      * @param \App\OfficeBrain\Bundle\UserBundle\Entity\EmployeeInfo $employeeInfo
  1920.      */
  1921.     public function removeEmployeeInfo(\App\OfficeBrain\Bundle\UserBundle\Entity\EmployeeInfo $employeeInfo)
  1922.     {
  1923.         $this->employeeInfo->removeElement($employeeInfo);
  1924.     }
  1925.     /**
  1926.      * Get employeeInfo
  1927.      *
  1928.      * @return \Doctrine\Common\Collections\Collection
  1929.      */
  1930.     public function getEmployeeInfo()
  1931.     {
  1932.         return $this->employeeInfo;
  1933.     }
  1934.     /**
  1935.      * Add greenbookSupplier
  1936.      *
  1937.      * @param \App\OfficeBrain\Bundle\CouponBundle\Entity\GreenBookMaster $greenbookSupplier
  1938.      *
  1939.      * @return User
  1940.      */
  1941.     public function addGreenbookSupplier(\App\OfficeBrain\Bundle\CouponBundle\Entity\GreenBookMaster $greenbookSupplier)
  1942.     {
  1943.         $this->greenbookSupplier[] = $greenbookSupplier;
  1944.         return $this;
  1945.     }
  1946.     /**
  1947.      * Remove greenbookSupplier
  1948.      *
  1949.      * @param \App\OfficeBrain\Bundle\CouponBundle\Entity\GreenBookMaster $greenbookSupplier
  1950.      */
  1951.     public function removeGreenbookSupplier(\App\OfficeBrain\Bundle\CouponBundle\Entity\GreenBookMaster $greenbookSupplier)
  1952.     {
  1953.         $this->greenbookSupplier->removeElement($greenbookSupplier);
  1954.     }
  1955.     /**
  1956.      * Get greenbookSupplier
  1957.      *
  1958.      * @return \Doctrine\Common\Collections\Collection
  1959.      */
  1960.     public function getGreenbookSupplier()
  1961.     {
  1962.         return $this->greenbookSupplier;
  1963.     }
  1964.     // Start symfony 4
  1965.     /**
  1966.      * Set otherCountry
  1967.      *
  1968.      * @param string $otherCountry
  1969.      * @return string
  1970.      */
  1971.     public function setOtherCountry($otherCountry)
  1972.     {
  1973.         $this->otherCountry $otherCountry;
  1974.     
  1975.         return $this;
  1976.     }
  1977.     
  1978.     /**
  1979.      * Get otherCountry
  1980.      *
  1981.      * @return string
  1982.      */
  1983.     public function getOtherCountry()
  1984.     {
  1985.         return $this->otherCountry;
  1986.     }
  1987.     // End symfony 4
  1988. }