mirror of
https://github.com/bodyrep/bodyrep-sandpit.git
synced 2026-01-27 07:11:37 +00:00
110 lines
1.8 KiB
PHP
110 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace BodyRep\Entity;
|
|
|
|
use Symfony\Component\Security\Core\User\UserInterface;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* @ORM\Entity
|
|
* @ORM\Table(name="member")
|
|
*/
|
|
class User implements UserInterface
|
|
{
|
|
/**
|
|
* @ORM\Id
|
|
* @ORM\Column(type="integer")
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
*/
|
|
protected $id;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=25, unique=true)
|
|
*/
|
|
protected $username;
|
|
|
|
/**
|
|
* @ORM\Column(name="password", type="string", length=255)
|
|
*/
|
|
protected $password;
|
|
|
|
/**
|
|
* @ORM\Column(name="salt", type="string", length=255)
|
|
*/
|
|
protected $salt;
|
|
|
|
protected $roles = array();
|
|
|
|
public function getRoles()
|
|
{
|
|
return $this->roles;
|
|
}
|
|
|
|
public function getSalt()
|
|
{
|
|
return $this->salt;
|
|
}
|
|
|
|
public function getUsername()
|
|
{
|
|
return $this->username;
|
|
}
|
|
|
|
public function eraseCredentials()
|
|
{
|
|
}
|
|
|
|
public function getPassword()
|
|
{
|
|
return $this->password;
|
|
}
|
|
|
|
/**
|
|
* Get id
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getId()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* Set username
|
|
*
|
|
* @param string $username
|
|
* @return User
|
|
*/
|
|
public function setUsername($username)
|
|
{
|
|
$this->username = $username;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Set password
|
|
*
|
|
* @param string $password
|
|
* @return User
|
|
*/
|
|
public function setPassword($password)
|
|
{
|
|
$this->password = $password;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Set salt
|
|
*
|
|
* @param string $salt
|
|
* @return User
|
|
*/
|
|
public function setSalt($salt)
|
|
{
|
|
$this->salt = $salt;
|
|
|
|
return $this;
|
|
}
|
|
} |