Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Tm\UserBundle\Entity;
- use Doctrine\ORM\Mapping as ORM;
- use FOS\UserBundle\Model\User as BaseUser;
- /**
- * @ORM\Table(name="utilisateur")
- * @ORM\Entity
- */
- class User extends BaseUser
- {
- /**
- * @ORM\Id
- * @ORM\Column(name="ID", type="integer")
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- protected $id;
- public function addRole($role)
- {
- $role = strtoupper($role);
- if (!in_array($role, $this->roles, true)) {
- $this->roles[] = $role;
- }
- return $this;
- }
- public function getId() {
- return $this->id;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement