Users Entity implements the Users Interface from Symfony 4
ORM\Entity | |
---|---|
ORM\Entity |
(repositoryClass="App\Repository\UsersRepository") |
UniqueEntity |
(fields="email", message="Email already taken") |
UniqueEntity |
(fields="username", message="Username already taken") |
ORM\Table |
(name="users") |
package |
App\Entity |
__construct()
createdOnPrePersit()
ORM\PrePersist | |
---|---|
eraseCredentials()
todo |
|
---|---|
getCreated() : integer
integer
$created
getEmail() : string
string
getGroupId() : \App\Entity\Groups|null
getId() : integer
integer
getPassword() : string
string
$password
getPlainPassword() : string
string
$plainPassword
getRoles() : array
array
$roles
getSalt() : null
null
getUpdated() : integer
integer
$updated
getUsername() : string
string
$username
setCreated(integer $created) : $this
integer
$this
setEmail(string $email)
string
setGroupId(\App\Entity\Groups|null $group_id) : \App\Entity\Users
setPassword(string $password)
string
setPlainPassword(string $password)
string
setRoles(array $roles)
array
setUpdated(integer $updated) : $this
integer
$this
setUsername(string $username)
string
updatedOnPostPersit()
ORM\PostPersist | |
---|---|
id :
ORM\Id | |
---|---|
ORM\Column |
(type="integer") |
ORM\GeneratedValue |
(strategy="AUTO") |
email :
ORM\Column |
(type="string", length=255, unique=true) |
---|---|
Assert\NotBlank | |
Assert\Email | |
username :
ORM\Column |
(type="string", length=255, unique=true) |
---|---|
Assert\NotBlank | |
plainPassword :
Assert\NotBlank |
() |
---|---|
Assert\Length |
(max=4096) |
password :
The below length depends on the "algorithm" you use for encoding the password, but this works well with bcrypt.
ORM\Column |
(type="string", length=64) |
---|---|
roles :
ORM\Column |
(type="array") |
---|---|
created : integer
var | |
---|---|
Gedmo\Timestampable |
(on="create") |
ORM\Column |
(type="integer", name="created", nullable=true) |
integer
updated : integer
var | |
---|---|
Gedmo\Timestampable |
(on="update") |
ORM\Column |
(type="integer", name="updated", nullable=true) |
integer
group_id :
ORM\ManyToOne |
(targetEntity="App\Entity\Groups", inversedBy="users") |
---|---|