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 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

eraseCredentials()

{@inheritdoc}

isAccountNonExpired()

{@inheritdoc}

isAccountNonLocked()

{@inheritdoc}

isCredentialsNonExpired()

{@inheritdoc}

isEnabled()

{@inheritdoc}

string
serialize()

Serializes the user

array
unserialize($serialized)

Unserialize the user

bool
hasRole(string|null $role)

Check if the user has the specified role

addRole(string|null $role)

Adds the role to the user

deleteRole(string|null $role)

Deletes the role to the user

setRoles(array $roles)

Set roles

array
getRoles()

Get roles

array
toArray()

Converts the entity in an array

int|null
getId()

Get id

string|null
getUsername()

Get username Kept for compatibility, returns email value as specified in Symfony docs

setAllowUse(bool $allowUse)

Set allowUse

bool
getAllowUse()

Get allowUse

setIdentifier(string|null $identifier)

Set identifier

string|null
getIdentifier()

Get identifier

setEmail(string|null $email)

Set email

string|null
getEmail()

Get email

setCreation(DateTimeInterface|null $creation)

Set creation

getCreation()

Get creation

setEnabled(bool $enabled)

Set enabled

bool
getEnabled()

Get enabled

setSalt(string|null $salt)

Set salt

string|null
getSalt()

Get salt

setPassword(string|null $password)

Set password

string|null
getPassword()

Get password

setToken(string|null $token)

Set token

string|null
getToken()

Get token

setPasswordRequest(DateTimeInterface|null $passwordRequest)

Set passwordRequest

getPasswordRequest()

Get passwordRequest

setPlainPassword(string|null $plainPassword)

Set plainPassword

string|null
getPlainPassword()

Get plainPassword

setChallenge(string|null $challenge)

Set challenge

string|null
getChallenge()

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

Return Value

string

at line 199
array unserialize($serialized)

Unserialize the user

Parameters

$serialized

Return Value

array

at line 215
bool hasRole(string|null $role)

Check if the user has the specified role

Parameters

string|null $role

Return Value

bool

at line 223
addRole(string|null $role)

Adds the role to the user

Parameters

string|null $role

at line 250
deleteRole(string|null $role)

Deletes the role to the user

Parameters

string|null $role

at line 275
setRoles(array $roles)

Set roles

Parameters

array $roles Roles

at line 290
array getRoles()

Get roles

Return Value

array

at line 312
array toArray()

Converts the entity in an array

Return Value

array

at line 338
int|null getId()

Get id

Return Value

int|null

at line 348
string|null getUsername()

Get username Kept for compatibility, returns email value as specified in Symfony docs

Return Value

string|null

at line 358
UserLight setAllowUse(bool $allowUse)

Set allowUse

Parameters

bool $allowUse If use is allowed

Return Value

UserLight

at line 368
bool getAllowUse()

Get allowUse

Return Value

bool

at line 378
UserLight setIdentifier(string|null $identifier)

Set identifier

Parameters

string|null $identifier Identifier

Return Value

UserLight

at line 388
string|null getIdentifier()

Get identifier

Return Value

string|null

at line 398
UserLight setEmail(string|null $email)

Set email

Parameters

string|null $email Email

Return Value

UserLight

at line 408
string|null getEmail()

Get email

Return Value

string|null

at line 418
UserLight setCreation(DateTimeInterface|null $creation)

Set creation

Parameters

DateTimeInterface|null $creation Datetime for creation

Return Value

UserLight

at line 428
DateTimeInterface|null getCreation()

Get creation

Return Value

DateTimeInterface|null

at line 438
UserLight setEnabled(bool $enabled)

Set enabled

Parameters

bool $enabled If enabled

Return Value

UserLight

at line 448
bool getEnabled()

Get enabled

Return Value

bool

at line 458
UserLight setSalt(string|null $salt)

Set salt

Parameters

string|null $salt Salt

Return Value

UserLight

at line 468
string|null getSalt()

Get salt

Return Value

string|null

at line 478
UserLight setPassword(string|null $password)

Set password

Parameters

string|null $password Password

Return Value

UserLight

at line 488
string|null getPassword()

Get password

Return Value

string|null

at line 498
UserLight setToken(string|null $token)

Set token

Parameters

string|null $token Token

Return Value

UserLight

at line 508
string|null getToken()

Get token

Return Value

string|null

at line 518
UserLight setPasswordRequest(DateTimeInterface|null $passwordRequest)

Set passwordRequest

Parameters

DateTimeInterface|null $passwordRequest Datetime for password request

Return Value

UserLight

at line 528
DateTimeInterface|null getPasswordRequest()

Get passwordRequest

Return Value

DateTimeInterface|null

at line 538
UserLight setPlainPassword(string|null $plainPassword)

Set plainPassword

Parameters

string|null $plainPassword Plain password (not stored)

Return Value

UserLight

at line 548
string|null getPlainPassword()

Get plainPassword

Return Value

string|null

at line 558
UserLight setChallenge(string|null $challenge)

Set challenge

Parameters

string|null $challenge Challenge

Return Value

UserLight

at line 568
string|null getChallenge()

Get challenge

Return Value

string|null