abstract class UserAbstract implements UserInterface

Entity UserAbstract

Traits

Trait UserAddressTrait
Trait UserAddressTrait

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

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

setGender(string|null $gender)

Set gender

string|null
getGender()

Get gender

setFirstname(string|null $firstname)

Set firstname

string|null
getFirstname()

Get firstname

setLastname(string|null $lastname)

Set lastname

string|null
getLastname()

Get lastname

setAvatar(string|null $avatar)

Set avatar

string|null
getAvatar()

Get avatar

setLatestSignin(DateTimeInterface|null $latestSignin)

Set latestSignin

getLatestSignin()

Get latestSignin

setLatestSignout(DateTimeInterface|null $latestSignout)

Set latestSignout

setLocale(string|null $locale)

Set locale

string|null
getLocale()

Get locale

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

Return Value

string

in UserLightTrait at line 199
array unserialize($serialized)

Unserialize the user

Parameters

$serialized

Return Value

array

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

Check if the user has the specified role

Parameters

string|null $role

Return Value

bool

in UserLightTrait at line 223
addRole(string|null $role)

Adds the role to the user

Parameters

string|null $role

in UserLightTrait at line 250
deleteRole(string|null $role)

Deletes the role to the user

Parameters

string|null $role

in UserLightTrait at line 275
setRoles(array $roles)

Set roles

Parameters

array $roles Roles

in UserLightTrait at line 290
array getRoles()

Get roles

Return Value

array

in UserLightTrait at line 312
array toArray()

Converts the entity in an array

Return Value

array

in UserLightTrait at line 338
int|null getId()

Get id

Return Value

int|null

in UserLightTrait at line 348
string|null getUsername()

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

Return Value

string|null

in UserLightTrait at line 358
UserLight setAllowUse(bool $allowUse)

Set allowUse

Parameters

bool $allowUse If use is allowed

Return Value

UserLight

in UserLightTrait at line 368
bool getAllowUse()

Get allowUse

Return Value

bool

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

Set identifier

Parameters

string|null $identifier Identifier

Return Value

UserLight

in UserLightTrait at line 388
string|null getIdentifier()

Get identifier

Return Value

string|null

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

Set email

Parameters

string|null $email Email

Return Value

UserLight

in UserLightTrait at line 408
string|null getEmail()

Get email

Return Value

string|null

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

Set creation

Parameters

DateTimeInterface|null $creation Datetime for creation

Return Value

UserLight

in UserLightTrait at line 428
DateTimeInterface|null getCreation()

Get creation

Return Value

DateTimeInterface|null

in UserLightTrait at line 438
UserLight setEnabled(bool $enabled)

Set enabled

Parameters

bool $enabled If enabled

Return Value

UserLight

in UserLightTrait at line 448
bool getEnabled()

Get enabled

Return Value

bool

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

Set salt

Parameters

string|null $salt Salt

Return Value

UserLight

in UserLightTrait at line 468
string|null getSalt()

Get salt

Return Value

string|null

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

Set password

Parameters

string|null $password Password

Return Value

UserLight

in UserLightTrait at line 488
string|null getPassword()

Get password

Return Value

string|null

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

Set token

Parameters

string|null $token Token

Return Value

UserLight

in UserLightTrait at line 508
string|null getToken()

Get token

Return Value

string|null

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

Set passwordRequest

Parameters

DateTimeInterface|null $passwordRequest Datetime for password request

Return Value

UserLight

in UserLightTrait at line 528
DateTimeInterface|null getPasswordRequest()

Get passwordRequest

Return Value

DateTimeInterface|null

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

Set plainPassword

Parameters

string|null $plainPassword Plain password (not stored)

Return Value

UserLight

in UserLightTrait at line 548
string|null getPlainPassword()

Get plainPassword

Return Value

string|null

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

Set challenge

Parameters

string|null $challenge Challenge

Return Value

UserLight

in UserLightTrait at line 568
string|null getChallenge()

Get challenge

Return Value

string|null

in UserDefaultTrait at line 104
UserLight setGender(string|null $gender)

Set gender

Parameters

string|null $gender Gender

Return Value

UserLight

in UserDefaultTrait at line 114
string|null getGender()

Get gender

Return Value

string|null

in UserDefaultTrait at line 124
UserLight setFirstname(string|null $firstname)

Set firstname

Parameters

string|null $firstname Firstname

Return Value

UserLight

in UserDefaultTrait at line 134
string|null getFirstname()

Get firstname

Return Value

string|null

in UserDefaultTrait at line 144
UserLight setLastname(string|null $lastname)

Set lastname

Parameters

string|null $lastname Lastname

Return Value

UserLight

in UserDefaultTrait at line 154
string|null getLastname()

Get lastname

Return Value

string|null

in UserDefaultTrait at line 164
UserLight setAvatar(string|null $avatar)

Set avatar

Parameters

string|null $avatar Avatar url

Return Value

UserLight

in UserDefaultTrait at line 174
string|null getAvatar()

Get avatar

Return Value

string|null

in UserDefaultTrait at line 184
UserLight setLatestSignin(DateTimeInterface|null $latestSignin)

Set latestSignin

Parameters

DateTimeInterface|null $latestSignin Datetime for latest signin

Return Value

UserLight

in UserDefaultTrait at line 194
DateTimeInterface|null getLatestSignin()

Get latestSignin

Return Value

DateTimeInterface|null

in UserDefaultTrait at line 204
UserLight setLatestSignout(DateTimeInterface|null $latestSignout)

Set latestSignout

Parameters

DateTimeInterface|null $latestSignout Datetime for latest signout

Return Value

UserLight

in UserDefaultTrait at line 214
DateTimeInterface getLatestSignout()

Get latestSignout

Return Value

DateTimeInterface

in UserDefaultTrait at line 224
UserLight setLocale(string|null $locale)

Set locale

Parameters

string|null $locale Locale

Return Value

UserLight

in UserDefaultTrait at line 234
string|null getLocale()

Get locale

Return Value

string|null