UserLightTrait
trait UserLightTrait
Trait UserAddressTrait
Properties
private int | $id | User unique id | |
private bool | $allowUse | If the user allows use of its account (GDPR) | |
private string | $identifier | Unique user identifier | |
private string | Email for the user | ||
private DateTime | $creation | DateTime for the creation | |
private bool | $enabled | If account is enabled | |
private string | $salt | Salt used to hash the password | |
private string | $password | Password hashed | |
private string | $token | Token used for sign-up and password recovery | |
private DateTime | $passwordRequest | DateTime of request for password recovery | |
private string | $roles | Roles for the user | |
private string | $plainPassword | Plain password (not strored, used only at sign-up and password chnage times) | |
private string | $challenge | Answer to the proposed challenge to avoid bots |
Methods
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
{@inheritdoc}
Serializes the user
Unserialize the user
Check if the user has the specified role
Adds the role to the user
Deletes the role to the user
Set roles
Get roles
Converts the entity in an array
Get id
Get username Kept for compatibility, returns email value as specified in Symfony docs
Set allowUse
Get allowUse
Set identifier
Get identifier
Get email
Get creation
Set enabled
Get enabled
Get salt
Set password
Get password
Get token
Get passwordRequest
Set plainPassword
Get plainPassword
Set challenge
Get challenge
Details
at line 144
eraseCredentials()
{@inheritdoc}
at line 151
isAccountNonExpired()
{@inheritdoc}
at line 159
isAccountNonLocked()
{@inheritdoc}
at line 167
isCredentialsNonExpired()
{@inheritdoc}
at line 175
isEnabled()
{@inheritdoc}
at line 184
string
serialize()
Serializes the user
at line 199
array
unserialize($serialized)
Unserialize the user
at line 215
bool
hasRole(string|null $role)
Check if the user has the specified role
at line 223
addRole(string|null $role)
Adds the role to the user
at line 250
deleteRole(string|null $role)
Deletes the role to the user
at line 275
setRoles(array $roles)
Set roles
at line 290
array
getRoles()
Get roles
at line 312
array
toArray()
Converts the entity in an array
at line 338
int|null
getId()
Get id
at line 348
string|null
getUsername()
Get username Kept for compatibility, returns email value as specified in Symfony docs
at line 358
UserLight
setAllowUse(bool $allowUse)
Set allowUse
at line 368
bool
getAllowUse()
Get allowUse
at line 378
UserLight
setIdentifier(string|null $identifier)
Set identifier
at line 388
string|null
getIdentifier()
Get identifier
at line 398
UserLight
setEmail(string|null $email)
Set email
at line 408
string|null
getEmail()
Get email
at line 418
UserLight
setCreation(DateTimeInterface|null $creation)
Set creation
at line 428
DateTimeInterface|null
getCreation()
Get creation
at line 438
UserLight
setEnabled(bool $enabled)
Set enabled
at line 448
bool
getEnabled()
Get enabled
at line 458
UserLight
setSalt(string|null $salt)
Set salt
at line 468
string|null
getSalt()
Get salt
at line 478
UserLight
setPassword(string|null $password)
Set password
at line 488
string|null
getPassword()
Get password
at line 498
UserLight
setToken(string|null $token)
Set token
at line 508
string|null
getToken()
Get token
at line 518
UserLight
setPasswordRequest(DateTimeInterface|null $passwordRequest)
Set passwordRequest
at line 528
DateTimeInterface|null
getPasswordRequest()
Get passwordRequest
at line 538
UserLight
setPlainPassword(string|null $plainPassword)
Set plainPassword
at line 548
string|null
getPlainPassword()
Get plainPassword
at line 558
UserLight
setChallenge(string|null $challenge)
Set challenge
at line 568
string|null
getChallenge()
Get challenge