User
in package
implements
UserInterface, PasswordAuthenticatedUserInterface
Attributes
- #[Entity]
- $repositoryClass: \App\Repository\UserRepository::class
- #[UniqueConstraint]
- $name: 'UNIQ_IDENTIFIER_USERNAME'
- $fields: ['username']
Table of Contents
Interfaces
- UserInterface
- PasswordAuthenticatedUserInterface
Properties
Methods
- eraseCredentials() : void
- getId() : int|null
- getPassword() : string
- getRoles() : array<int, string>
- getUserIdentifier() : string
- A visual identifier that represents this user.
- getUsername() : string|null
- setPassword() : static
- setRoles() : static
- setUsername() : static
Properties
$id
private
int|null
$id
= null
Attributes
- #[Column]
- #[GeneratedValue]
- #[Id]
$password
private
string
$password
= null
The hashed password
Attributes
- #[Column]
$roles
private
array<int, string>
$roles
= []
The user roles
Attributes
- #[Column]
$username
private
string|null
$username
= null
Attributes
- #[Column]
- $length: 180
Methods
eraseCredentials()
public
eraseCredentials() : void
Tags
getId()
public
getId() : int|null
Return values
int|nullgetPassword()
public
getPassword() : string
Tags
Return values
stringgetRoles()
public
getRoles() : array<int, string>
Tags
Return values
array<int, string>getUserIdentifier()
A visual identifier that represents this user.
public
getUserIdentifier() : string
Tags
Return values
stringgetUsername()
public
getUsername() : string|null
Return values
string|nullsetPassword()
public
setPassword(string $password) : static
Parameters
- $password : string
Return values
staticsetRoles()
public
setRoles(array<int, string> $roles) : static
Parameters
- $roles : array<int, string>
Return values
staticsetUsername()
public
setUsername(string $username) : static
Parameters
- $username : string