Beta version

class User extends AbstractHuman implements AdvancedUserInterface

User Entity.

Methods

int
getId()

Get entity unique identifier.

setId(int $id)

No description

getCreatedAt()

No description

setCreatedAt(DateTime $createdAt)

No description

getUpdatedAt()

No description

setUpdatedAt(DateTime $updatedAt)

No description

preUpdate()

No description

prePersist()

No description

resetDates()

Set creation and update date to now.

string
getEmail()

No description

$this
setEmail(string $email)

No description

string
getFirstName()

No description

$this
setFirstName(string $firstName)

No description

string
getLastName()

No description

$this
setLastName(string $lastName)

No description

string
getCompany()

No description

$this
setCompany(string $company)

No description

string
getJob()

No description

$this
setJob(string $job)

No description

getBirthday()

No description

$this
setBirthday(DateTime $birthday = null)

No description

mixed
getPhone()

Gets the value of phone.

setPhone(mixed $phone)

Sets the value of phone.

bool
willSendCreationConfirmationEmail()

Tells if we need Roadiz to send a default email when User will be persisted. Default: false.

sendCreationConfirmationEmail(bool $sendCreationConfirmationEmail)

Set if we need Roadiz to send a default email when User will be persisted.

string
getUsername()

No description

string
setUsername(string $username)

No description

string
getIdentifier()

Get available user name data, first name and last name or username as a last try.

string
getFacebookName()

Get facebook profile name to grab public infos such as picture

string
setFacebookName(string $facebookName)

No description

string
getPictureUrl()

No description

string
setPictureUrl(string $pictureUrl)

No description

string
getSalt()

No description

string
setSalt(string $salt)

No description

string
getPassword()

No description

string
setPassword(string $password)

No description

string
getPlainPassword()

No description

setPlainPassword(string $plainPassword)

No description

bool
isEnabled()

Checks whether the user is enabled.

setEnabled(boolean $enabled)

No description

getLastLogin()

No description

setLastLogin(DateTime $lastLogin)

No description

string
getConfirmationToken()

Get random string sent to the user email address in order to verify it.

$this
setConfirmationToken(string $confirmationToken)

Set random string sent to the user email address in order to verify it.

$this
setPasswordRequestedAt(DateTime $date = null)

Sets the timestamp that the user requested a password reset.

null|DateTime
getPasswordRequestedAt()

Gets the timestamp that the user requested a password reset.

boolean
isPasswordRequestNonExpired(int $ttl)

Check if password reset request has expired.

ArrayCollection
getRolesEntities()

Get roles entities

array
getRoles()

Get roles names as a simple array, combining groups roles.

$this
addRole(Role $role)

Add a role object to current user.

$this
removeRole(Role $role)

Remove role from current user.

void
eraseCredentials()

Removes sensitive data from the user.

ArrayCollection
getGroups()

No description

$this
addGroup(Group $group)

Insert user into group.

$this
removeGroup(Group $group)

Remove user from group

array
getGroupNames()

Get current user groups name.

boolean
getExpired()

Return strictly forced expiration status.

$this
setExpired(boolean $expired)

No description

bool
isAccountNonExpired()

Checks whether the user's account has expired.

bool
isAccountNonLocked()

Checks whether the user is locked.

setLocked($locked)

No description

boolean
equals(User $user)

[email protected]}

setCredentialsExpiresAt(DateTime $date = null)

No description

boolean
getCredentialsExpired()

Return strictly forced credentials expiration status.

$this
setCredentialsExpired(boolean $newcredentialsExpired)

No description

bool
isCredentialsNonExpired()

Checks whether the user's credentials (password) has expired.

setExpiresAt(DateTime $date = null)

No description

getExpiresAt()

No description

setChroot(Node $chroot = null)

No description

getChroot()

No description

string
getGravatarUrl()

Get prototype abstract gravatar url.

__construct()

Constructor

getHandler()

No description

getViewer()

No description

string
__toString()

No description

Details

in AbstractEntity at line 51
int getId()

Get entity unique identifier.

Return Value

int

in AbstractEntity at line 60
AbstractEntity setId(int $id)

Parameters

int $id

Return Value

AbstractEntity

in AbstractDateTimed at line 53
DateTime getCreatedAt()

Return Value

DateTime

in AbstractDateTimed at line 62
AbstractEntity setCreatedAt(DateTime $createdAt)

Parameters

DateTime $createdAt

Return Value

AbstractEntity

in AbstractDateTimed at line 77
DateTime getUpdatedAt()

Return Value

DateTime

in AbstractDateTimed at line 86
AbstractEntity setUpdatedAt(DateTime $updatedAt)

Parameters

DateTime $updatedAt

Return Value

AbstractEntity

in AbstractDateTimed at line 96
preUpdate()

in AbstractDateTimed at line 103
prePersist()

in AbstractDateTimed at line 113
AbstractEntity resetDates()

Set creation and update date to now.

Return Value

AbstractEntity

in AbstractHuman at line 51
string getEmail()

Return Value

string

in AbstractHuman at line 60
$this setEmail(string $email)

Parameters

string $email

Return Value

$this

in AbstractHuman at line 76
string getFirstName()

Return Value

string

in AbstractHuman at line 85
$this setFirstName(string $firstName)

Parameters

string $firstName

Return Value

$this

in AbstractHuman at line 99
string getLastName()

Return Value

string

in AbstractHuman at line 108
$this setLastName(string $lastName)

Parameters

string $lastName

Return Value

$this

in AbstractHuman at line 128
string getCompany()

Return Value

string

in AbstractHuman at line 137
$this setCompany(string $company)

Parameters

string $company

Return Value

$this

in AbstractHuman at line 151
string getJob()

Return Value

string

in AbstractHuman at line 160
$this setJob(string $job)

Parameters

string $job

Return Value

$this

in AbstractHuman at line 175
DateTime getBirthday()

Return Value

DateTime

in AbstractHuman at line 184
$this setBirthday(DateTime $birthday = null)

Parameters

DateTime $birthday

Return Value

$this

in AbstractHuman at line 196
mixed getPhone()

Gets the value of phone.

Return Value

mixed

in AbstractHuman at line 208
AbstractHuman setPhone(mixed $phone)

Sets the value of phone.

Parameters

mixed $phone the phone

Return Value

AbstractHuman

at line 64
bool willSendCreationConfirmationEmail()

Tells if we need Roadiz to send a default email when User will be persisted. Default: false.

Return Value

bool

at line 76
User sendCreationConfirmationEmail(bool $sendCreationConfirmationEmail)

Set if we need Roadiz to send a default email when User will be persisted.

Parameters

bool $sendCreationConfirmationEmail

Return Value

User

at line 91
string getUsername()

Return Value

string $username

at line 101
string setUsername(string $username)

Parameters

string $username

Return Value

string $username

at line 114
string getIdentifier()

Get available user name data, first name and last name or username as a last try.

Return Value

string

at line 135
string getFacebookName()

Get facebook profile name to grab public infos such as picture

Return Value

string

at line 145
string setFacebookName(string $facebookName)

Parameters

string $facebookName

Return Value

string $facebookName

at line 160
string getPictureUrl()

Return Value

string

at line 170
string setPictureUrl(string $pictureUrl)

Parameters

string $pictureUrl

Return Value

string $pictureURL

at line 188
string getSalt()

Return Value

string

at line 198
string setSalt(string $salt)

Parameters

string $salt

Return Value

string $salt

at line 215
string getPassword()

Return Value

string $password

at line 225
string setPassword(string $password)

Parameters

string $password

Return Value

string $password

at line 243
string getPlainPassword()

Return Value

string $plainPassword

at line 253
User setPlainPassword(string $plainPassword)

Parameters

string $plainPassword

Return Value

User

at line 279
bool isEnabled()

Checks whether the user is enabled.

Internally, if this method returns false, the authentication system will throw a DisabledException and prevent login.

Return Value

bool true if the user is enabled, false otherwise

See also

DisabledException

at line 289
User setEnabled(boolean $enabled)

Parameters

boolean $enabled

Return Value

User

at line 305
DateTime getLastLogin()

Return Value

DateTime $lastLogin

at line 315
User setLastLogin(DateTime $lastLogin)

Parameters

DateTime $lastLogin

Return Value

User

at line 333
string getConfirmationToken()

Get random string sent to the user email address in order to verify it.

Return Value

string

at line 344
$this setConfirmationToken(string $confirmationToken)

Set random string sent to the user email address in order to verify it.

Parameters

string $confirmationToken

Return Value

$this

at line 363
$this setPasswordRequestedAt(DateTime $date = null)

Sets the timestamp that the user requested a password reset.

Parameters

DateTime $date

Return Value

$this

at line 374
null|DateTime getPasswordRequestedAt()

Gets the timestamp that the user requested a password reset.

Return Value

null|DateTime

at line 386
boolean isPasswordRequestNonExpired(int $ttl)

Check if password reset request has expired.

Parameters

int $ttl Password request time to live.

Return Value

boolean

at line 412
ArrayCollection getRolesEntities()

Get roles entities

Return Value

ArrayCollection

at line 422
array getRoles()

Get roles names as a simple array, combining groups roles.

Return Value

array

at line 450
$this addRole(Role $role)

Add a role object to current user.

Parameters

Role $role

Return Value

$this

at line 465
$this removeRole(Role $role)

Remove role from current user.

Parameters

Role $role

Return Value

$this

at line 479
void eraseCredentials()

Removes sensitive data from the user.

Return Value

void

at line 497
ArrayCollection getGroups()

Return Value

ArrayCollection

at line 508
$this addGroup(Group $group)

Insert user into group.

Parameters

Group $group

Return Value

$this

at line 523
$this removeGroup(Group $group)

Remove user from group

Parameters

Group $group

Return Value

$this

at line 537
array getGroupNames()

Get current user groups name.

Return Value

array Array of strings

at line 558
boolean getExpired()

Return strictly forced expiration status.

Return Value

boolean

at line 567
$this setExpired(boolean $expired)

Parameters

boolean $expired

Return Value

$this

at line 586
bool isAccountNonExpired()

Checks whether the user's account has expired.

Combines expiresAt date-time limit AND expired boolean value.

Internally, if this method returns false, the authentication system will throw an AccountExpiredException and prevent login.

Return Value

bool true if the user's account is non expired, false otherwise

See also

AccountExpiredException

at line 612
bool isAccountNonLocked()

Checks whether the user is locked.

Internally, if this method returns false, the authentication system will throw a LockedException and prevent login.

Return Value

bool true if the user is not locked, false otherwise

See also

LockedException

at line 617
setLocked($locked)

Parameters

$locked

at line 631
boolean equals(User $user)

[email protected]}

Parameters

User $user

Return Value

boolean

at line 650
User setCredentialsExpiresAt(DateTime $date = null)

Parameters

DateTime $date

Return Value

User

at line 660
DateTime getCredentialsExpiresAt()

Return Value

DateTime

at line 676
boolean getCredentialsExpired()

Return strictly forced credentials expiration status.

Return Value

boolean

at line 685
$this setCredentialsExpired(boolean $newcredentialsExpired)

Parameters

boolean $newcredentialsExpired

Return Value

$this

at line 704
bool isCredentialsNonExpired()

Checks whether the user's credentials (password) has expired.

Combines credentialsExpiresAt date-time limit AND credentialsExpired boolean value.

Internally, if this method returns false, the authentication system will throw a CredentialsExpiredException and prevent login.

Return Value

bool true if the user's credentials are non expired, false otherwise

See also

CredentialsExpiredException

at line 725
User setExpiresAt(DateTime $date = null)

Parameters

DateTime $date

Return Value

User

at line 735
DateTime getExpiresAt()

Return Value

DateTime

at line 752
User setChroot(Node $chroot = null)

Parameters

Node $chroot

Return Value

User

at line 762
Node getChroot()

Return Value

Node

at line 772
string getGravatarUrl()

Get prototype abstract gravatar url.

Return Value

string

at line 780
__construct()

Constructor

at line 793
UserHandler getHandler()

Return Value

UserHandler

at line 801
UserViewer getViewer()

Return Value

UserViewer

at line 809
string __toString()

Return Value

string $text