Constants

STATUS_ACTIVE

STATUS_ACTIVE = true

STATUS_RETIRED

STATUS_RETIRED = false

Properties

$roleMaps

$roleMaps : \Doctrine\Common\Collections\ArrayCollection

Type

\Doctrine\Common\Collections\ArrayCollection — a collection of UserRoleMap entities associated with this User entity.

$id

$id : integer

Type

integer — The database id of this user

$email

$email : string

Type

string — The e-mail address of this user.

$fullName

$fullName : string

Type

string — the full name of this user (if given)

$password

$password : string

Type

string — The (hashed) password for this user.

$photo

$photo : boolean

Type

boolean — Whether user has upload a photo or not.

$status

$status : boolean

Type

boolean — The status of this user ie. active = true or retired = false.

$dateCreated

$dateCreated : \DateTime

Type

\DateTime — The date time that this user account was created.

$pwdResetToken

$pwdResetToken : string

Type

string — A token that is created when a user forgets their password It's sent to them via e-mail and checked on the return request.

$pwdResetTokenDate

$pwdResetTokenDate : \DateTime

Type

\DateTime — The date time when the password reset token is created So that the reset request has only a fixed time limit.

Methods

__construct()

__construct() 

Entity constructor that initialises the role map collection

setRoleMaps()

setRoleMaps(\Doctrine\Common\Collections\ArrayCollection  $roleMaps) : $this

Add Array Collection of UserRoleMaps (Unit tests)

Parameters

\Doctrine\Common\Collections\ArrayCollection $roleMaps

Returns

$this

getRoleMaps()

getRoleMaps() : \Doctrine\Common\Collections\ArrayCollection

Get a collection of user role maps for this user.

Returns

\Doctrine\Common\Collections\ArrayCollection

setId()

setId(integer  $id) : \AclUser\Entity\User

Set the id for this user used in unit tests only

Parameters

integer $id

Returns

\AclUser\Entity\User

getId()

getId() : integer

Get id

Returns

integer

setEmail()

setEmail(string  $email) : \AclUser\Entity\User

Set email

Parameters

string $email

Returns

\AclUser\Entity\User

getEmail()

getEmail() : string

Get email

Returns

string

setFullName()

setFullName(string  $fullName) : \AclUser\Entity\User

Set fullName

Parameters

string $fullName

Returns

\AclUser\Entity\User

getFullName()

getFullName() : string

Get fullName

Returns

string

setPassword()

setPassword(string  $password) : \AclUser\Entity\User

Set password

Parameters

string $password

Returns

\AclUser\Entity\User

getPassword()

getPassword() : string

Get password

Returns

string

setPhoto()

setPhoto(boolean  $photo) : \AclUser\Entity\User

Set photo whether user has uploaded a photo

Parameters

boolean $photo

Returns

\AclUser\Entity\User

user entity object

getPhoto()

getPhoto() : boolean

Get whether user has uploaded a photo

Returns

boolean

setStatus()

setStatus(boolean  $status) : \AclUser\Entity\User

Set status

Parameters

boolean $status

Returns

\AclUser\Entity\User

getStatus()

getStatus() : boolean

Get status

Returns

boolean

toggleStatus()

toggleStatus() 

retire user if active or make active if retired

setDateCreated()

setDateCreated(\DateTime  $dateCreated) : \AclUser\Entity\User

Set dateCreated

Parameters

\DateTime $dateCreated

Returns

\AclUser\Entity\User

getDateCreated()

getDateCreated() : \DateTime

Get dateCreated

Returns

\DateTime

setPwdResetToken()

setPwdResetToken(string  $pwdResetToken) : \AclUser\Entity\User

Set pwdResetToken

Parameters

string $pwdResetToken

Returns

\AclUser\Entity\User

getPwdResetToken()

getPwdResetToken() : string

Get pwdResetToken

Returns

string

setPwdResetTokenDate()

setPwdResetTokenDate(\DateTime  $pwdResetTokenDate) : \AclUser\Entity\User

Set pwdResetTokenDate

Parameters

\DateTime $pwdResetTokenDate

Returns

\AclUser\Entity\User

getPwdResetTokenDate()

getPwdResetTokenDate() : \DateTime

Get pwdResetTokenDate

Returns

\DateTime