3 namespace Mixstore\UserBundle\Entity
;
5 use FOS\UserBundle\Model\User
as BaseUser
;
6 use Doctrine\ORM\Mapping
as ORM
;
10 * @ORM\Table(name="ms_user")
12 class User
extends BaseUser
16 * @ORM\Column(type="integer")
17 * @ORM\GeneratedValue(strategy="AUTO")
22 * @ORM\Column(type="string")
27 * @ORM\Column(type="string")
32 * @ORM\Column(type="boolean")
34 private $emailnotif0 = false;
37 * @ORM\Column(type="boolean")
39 private $emailnotif1 = false;
41 public function __construct()
43 parent
::__construct();
51 public function getId()
62 public function setName($name)
74 public function getName()
82 * @param string $surname
85 public function setSurname($surname)
87 $this->surname
= $surname;
97 public function getSurname()
99 return $this->surname
;
103 * Set email (override base behavior)
105 * @param string $email
108 public function setEmail($email)
110 //http://stackoverflow.com/questions/8832916/remove-replace-the-username-field-with-email-using-fosuserbundle-in-symfony2
111 $email = is_null($email) ? '' : $email;
112 parent
::setEmail($email);
113 $this->setUsername($email);
121 * @param boolean $emailnotif0
124 public function setEmailnotif0($emailnotif0)
126 $this->emailnotif0
= $emailnotif0;
136 public function getEmailnotif0()
138 return $this->emailnotif0
;
144 * @param boolean $emailnotif1
147 public function setEmailnotif1($emailnotif1)
149 $this->emailnotif1
= $emailnotif1;
159 public function getEmailnotif1()
161 return $this->emailnotif1
;