User
class User extends UserAbstract
Entity User (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 |
private string | $gender | Gender for the user | from UserDefaultTrait |
private string | $firstname | Firstname for the user | from UserDefaultTrait |
private string | $lastname | Lastname for the user | from UserDefaultTrait |
private string | $avatar | url used for the Avatar for the user | from UserDefaultTrait |
private DateTime | $latestSignin | DateTime of latest sign-in | from UserDefaultTrait |
private DateTime | $latestSignout | DateTime of latest sign-out | from UserDefaultTrait |
private string | $locale | Locale for the user | from UserDefaultTrait |
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
in UserDefaultTrait at line 104
UserLight
setGender(string|null $gender)
Set gender
in UserDefaultTrait at line 114
string|null
getGender()
Get gender
in UserDefaultTrait at line 124
UserLight
setFirstname(string|null $firstname)
Set firstname
in UserDefaultTrait at line 134
string|null
getFirstname()
Get firstname
in UserDefaultTrait at line 144
UserLight
setLastname(string|null $lastname)
Set lastname
in UserDefaultTrait at line 154
string|null
getLastname()
Get lastname
in UserDefaultTrait at line 164
UserLight
setAvatar(string|null $avatar)
Set avatar
in UserDefaultTrait at line 174
string|null
getAvatar()
Get avatar
in UserDefaultTrait at line 184
UserLight
setLatestSignin(DateTimeInterface|null $latestSignin)
Set latestSignin
in UserDefaultTrait at line 194
DateTimeInterface|null
getLatestSignin()
Get latestSignin
in UserDefaultTrait at line 204
UserLight
setLatestSignout(DateTimeInterface|null $latestSignout)
Set latestSignout
in UserDefaultTrait at line 214
DateTimeInterface
getLatestSignout()
Get latestSignout
in UserDefaultTrait at line 224
UserLight
setLocale(string|null $locale)
Set locale
in UserDefaultTrait at line 234
string|null
getLocale()
Get locale