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