Created
April 28, 2018 22:25
-
-
Save emir/ccdb90dd8bd8b0bc5e3107354953f735 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Entity; | |
| use Doctrine\ORM\Mapping as ORM; | |
| use Symfony\Component\Security\Core\User\UserInterface; | |
| /** | |
| * @ORM\Table(name="users") | |
| * @ORM\Entity | |
| */ | |
| class User implements UserInterface | |
| { | |
| /** | |
| * @ORM\Column(type="integer") | |
| * @ORM\Id | |
| * @ORM\GeneratedValue(strategy="AUTO") | |
| */ | |
| private $id; | |
| /** | |
| * @ORM\Column(type="string", length=25, unique=true) | |
| */ | |
| private $username; | |
| /** | |
| * @ORM\Column(type="string", length=500) | |
| */ | |
| private $password; | |
| /** | |
| * @ORM\Column(name="is_active", type="boolean") | |
| */ | |
| private $isActive; | |
| public function __construct($username) | |
| { | |
| $this->isActive = true; | |
| $this->username = $username; | |
| } | |
| public function getUsername() | |
| { | |
| return $this->username; | |
| } | |
| public function getSalt() | |
| { | |
| return null; | |
| } | |
| public function getPassword() | |
| { | |
| return $this->password; | |
| } | |
| public function setPassword($password) | |
| { | |
| $this->password = $password; | |
| } | |
| public function getRoles() | |
| { | |
| return array('ROLE_USER'); | |
| } | |
| public function eraseCredentials() | |
| { | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment