User
extends EntityBase
in package
Cx\Core\User\Model\Entity\User
Table of Contents
Properties
- $localeCodes : array<string|int, mixed>
- List of locale codes ordered by translation fallback order per Cx instance
- $nestingCount : int
- Counts the nesting level of __call()
- $stringRepresentationBlank : bool
- Whether blank string representations are valid
- $stringRepresentationFields : array<string|int, mixed>
- List of fields that should be available in the string representation
- $stringRepresentationFormat : string
- Sprintf format for the string representation
- $validators : array<string|int, mixed>
- Initialize this array as follows: array( 'columName' => Zend_Validate )
- $virtual : bool
- Defines if an entity is virtual and therefore not persistable.
- $active : int
- $authToken : string
- $authTokenTimeout : int
- $backendLangId : int
- $email : string
- $emailAccess : string
- $expiration : int
- $frontendLangId : int
- $group : Collection
- $id : int
- $isAdmin : int
- $lastActivity : int
- $lastAuth : int
- $lastAuthStatus : int
- $password : string
- $primaryGroup : int
- $profileAccess : string
- $regdate : int
- $restoreKey : string
- $restoreKeyTime : int
- $username : string
- $userProfile : UserProfile
- $validity : int
- $verified : int
Methods
- __call() : mixed
- Route methods like getName(), getType(), getDirectory(), etc.
- __construct() : mixed
- __get() : mixed
- This is an ugly solution to allow $this->cx to be available in all entity classes Since the entity's constructor is not called when an entity is loaded from DB this cannot be assigned there.
- __toString() : string
- Returns this entity's identifying value
- addGroup() : mixed
- Add group
- getActive() : int
- Get active
- getAuthToken() : string
- Get authToken
- getAuthTokenTimeout() : int
- Get authTokenTimeout
- getBackendLangId() : int
- Get backendLangId
- getComponentController() : SystemComponent
- Returns the component controller for this component
- getEmail() : string
- Get email
- getEmailAccess() : string
- Get emailAccess
- getExpiration() : int
- Get expiration
- getFrontendLangId() : int
- Get frontendLangId
- getGroup() : Collection
- Get group
- getId() : int
- Get id
- getIsAdmin() : int
- Get isAdmin
- getKeyAsString() : string
- Returns this entity's key
- getLastActivity() : int
- Get lastActivity
- getLastAuth() : int
- Get lastAuth
- getLastAuthStatus() : int
- Get lastAuthStatus
- getPassword() : string
- Get password
- getPrimaryGroup() : int
- Get primaryGroup
- getProfileAccess() : string
- Get profileAccess
- getRegdate() : int
- Get regdate
- getRestoreKey() : string
- Get restoreKey
- getRestoreKeyTime() : int
- Get restoreKeyTime
- getTranslatedFieldValue() : mixed
- Returns the value of a translatable field using fallback mechanisms
- getUsername() : string
- Get username
- getUserProfile() : UserProfile
- Get userProfile
- getValidity() : int
- Get validity
- getVerified() : int
- Get verified
- initializeValidators() : mixed
- Set $this->validators
- isBackendGroupUser() : bool
- Check if the user is backend group
- isVirtual() : bool
- Returns the virtuality of the entity
- removeGroup() : mixed
- Remove the group
- setActive() : mixed
- Set active
- setAuthToken() : mixed
- Set authToken
- setAuthTokenTimeout() : mixed
- Set $authTokenTimeout
- setBackendLangId() : mixed
- Set backendLangId
- setEmail() : mixed
- Set email
- setEmailAccess() : mixed
- Set emailAccess
- setExpiration() : mixed
- Set expiration
- setFrontendLangId() : mixed
- Set frontendLangId
- setId() : mixed
- set id
- setIsAdmin() : mixed
- Set isAdmin
- setLastActivity() : mixed
- Set lastActivity
- setLastAuth() : mixed
- Set lastAuth
- setLastAuthStatus() : mixed
- Set lastAuthStatus
- setPassword() : mixed
- Set password
- setPrimaryGroup() : mixed
- Set primaryGroup
- setProfileAccess() : mixed
- Set profileAccess
- setRegdate() : mixed
- Set regdate
- setRestoreKey() : mixed
- Set restoreKey
- setRestoreKeyTime() : mixed
- Set restoreKeyTime
- setUsername() : mixed
- Set username
- setUserProfile() : mixed
- Set userProfile
- setValidity() : mixed
- Set validity
- setVerified() : mixed
- Set verified
- setVirtual() : mixed
- Set the virtuality of the entity
- validate() : mixed
- getFallbackLocaleCodes() : array<string|int, mixed>
- Returns a list of all locale codes ordered by fallback order
- getStringRepresentationBlank() : bool
- Whether blank string representations are valid
- getStringRepresentationFields() : array<string|int, mixed>
- Returns a list of fields available in the string representation
- getStringRepresentationFormat() : string
- Returns the sprintf() format for the string representation
Properties
$localeCodes
List of locale codes ordered by translation fallback order per Cx instance
protected
static array<string|int, mixed>
$localeCodes
= array()
Array in the form: array(<instanceId> => array(<localeCode>, ...))
Tags
$nestingCount
Counts the nesting level of __call()
protected
static int
$nestingCount
= 0
$stringRepresentationBlank
Whether blank string representations are valid
protected
bool
$stringRepresentationBlank
= false
Whether blank string representations are valid
Tags
$stringRepresentationFields
List of fields that should be available in the string representation
protected
array<string|int, mixed>
$stringRepresentationFields
= array()
List of field names
Tags
$stringRepresentationFormat
Sprintf format for the string representation
protected
string
$stringRepresentationFormat
= ''
Sprintf format string
Tags
$validators
Initialize this array as follows: array( 'columName' => Zend_Validate )
protected
array<string|int, mixed>
$validators
= array()
$virtual
Defines if an entity is virtual and therefore not persistable.
protected
bool
$virtual
= false
Defaults to FALSE - not virtual.
$active
private
int
$active
$authToken
private
string
$authToken
$authTokenTimeout
private
int
$authTokenTimeout
$backendLangId
private
int
$backendLangId
private
string
$email
$emailAccess
private
string
$emailAccess
$expiration
private
int
$expiration
$frontendLangId
private
int
$frontendLangId
$group
private
Collection
$group
$id
private
int
$id
$isAdmin
private
int
$isAdmin
$lastActivity
private
int
$lastActivity
$lastAuth
private
int
$lastAuth
$lastAuthStatus
private
int
$lastAuthStatus
$password
private
string
$password
$primaryGroup
private
int
$primaryGroup
$profileAccess
private
string
$profileAccess
$regdate
private
int
$regdate
$restoreKey
private
string
$restoreKey
$restoreKeyTime
private
int
$restoreKeyTime
$username
private
string
$username
$userProfile
private
UserProfile
$userProfile
$validity
private
int
$validity
$verified
private
int
$verified
Methods
__call()
Route methods like getName(), getType(), getDirectory(), etc.
public
__call(string $methodName, array<string|int, mixed> $arguments) : mixed
Parameters
- $methodName : string
-
Name of method to call
- $arguments : array<string|int, mixed>
-
List of arguments for the method to call
Tags
Return values
mixed —Return value of the method to call
__construct()
public
__construct() : mixed
__get()
This is an ugly solution to allow $this->cx to be available in all entity classes Since the entity's constructor is not called when an entity is loaded from DB this cannot be assigned there.
public
__get(mixed $name) : mixed
Parameters
- $name : mixed
__toString()
Returns this entity's identifying value
public
__toString() : string
By default this returns the same as getKeyAsString(), but this method might get overridden by subclasses.
Return values
string —Identifying value for this entity
addGroup()
Add group
public
addGroup(Group $group) : mixed
Parameters
- $group : Group
getActive()
Get active
public
getActive() : int
Return values
int —$active
getAuthToken()
Get authToken
public
getAuthToken() : string
Return values
string —$authToken
getAuthTokenTimeout()
Get authTokenTimeout
public
getAuthTokenTimeout() : int
Return values
int —$authTokenTimeout
getBackendLangId()
Get backendLangId
public
getBackendLangId() : int
Return values
int —$backendLangId
getComponentController()
Returns the component controller for this component
public
getComponentController() : SystemComponent
Return values
SystemComponentgetEmail()
Get email
public
getEmail() : string
Return values
string —getEmailAccess()
Get emailAccess
public
getEmailAccess() : string
Return values
string —$emailAccess
getExpiration()
Get expiration
public
getExpiration() : int
Return values
int —$expiration
getFrontendLangId()
Get frontendLangId
public
getFrontendLangId() : int
Return values
int —$frontendLangId
getGroup()
Get group
public
getGroup() : Collection
Return values
Collection —$group
getId()
Get id
public
getId() : int
Return values
int —$id
getIsAdmin()
Get isAdmin
public
getIsAdmin() : int
Return values
int —$isAdmin
getKeyAsString()
Returns this entity's key
public
final getKeyAsString([string $separator = '/' ]) : string
If this entity has a composite key, the fields are separated by $separator.
Parameters
- $separator : string = '/'
-
(optional) Separator for composite key fields, default "/"
Return values
string —Entity key as string
getLastActivity()
Get lastActivity
public
getLastActivity() : int
Return values
int —$lastActivity
getLastAuth()
Get lastAuth
public
getLastAuth() : int
Return values
int —$lastAuth
getLastAuthStatus()
Get lastAuthStatus
public
getLastAuthStatus() : int
Return values
int —$lastAuthStatus
getPassword()
Get password
public
getPassword() : string
Return values
string —$password
getPrimaryGroup()
Get primaryGroup
public
getPrimaryGroup() : int
Return values
int —$primaryGroup
getProfileAccess()
Get profileAccess
public
getProfileAccess() : string
Return values
string —$profileAccess
getRegdate()
Get regdate
public
getRegdate() : int
Return values
int —$regdate
getRestoreKey()
Get restoreKey
public
getRestoreKey() : string
Return values
string —$restoreKey
getRestoreKeyTime()
Get restoreKeyTime
public
getRestoreKeyTime() : int
Return values
int —$restoreKeyTime
getTranslatedFieldValue()
Returns the value of a translatable field using fallback mechanisms
public
getTranslatedFieldValue(string $fieldName) : mixed
If the field is not translatable its value is returned anyway. Tries to return the value in the following locales (if non-empty):
- Current locale
- Default locale
- All other locales
Parameters
- $fieldName : string
-
Name of a translatable field
getUsername()
Get username
public
getUsername() : string
Return values
string —$username
getUserProfile()
Get userProfile
public
getUserProfile() : UserProfile
Return values
UserProfile —$userProfile
getValidity()
Get validity
public
getValidity() : int
Return values
int —$validity
getVerified()
Get verified
public
getVerified() : int
Return values
int —$verified
initializeValidators()
Set $this->validators
public
initializeValidators() : mixed
Validators can be found in lib/FRAMEWORK/Validator.class.php These will be executed if validate() is called
isBackendGroupUser()
Check if the user is backend group
public
isBackendGroupUser() : bool
Return values
boolisVirtual()
Returns the virtuality of the entity
public
isVirtual() : bool
Return values
bool —TRUE if the entity is virtual, otherwise FALSE
removeGroup()
Remove the group
public
removeGroup(Group $group) : mixed
Parameters
- $group : Group
setActive()
Set active
public
setActive(int $active) : mixed
Parameters
- $active : int
setAuthToken()
Set authToken
public
setAuthToken(string $authToken) : mixed
Parameters
- $authToken : string
setAuthTokenTimeout()
Set $authTokenTimeout
public
setAuthTokenTimeout(int $authTokenTimeout) : mixed
Parameters
- $authTokenTimeout : int
setBackendLangId()
Set backendLangId
public
setBackendLangId(int $backendLangId) : mixed
Parameters
- $backendLangId : int
setEmail()
Set email
public
setEmail(string $email) : mixed
Parameters
- $email : string
setEmailAccess()
Set emailAccess
public
setEmailAccess(string $emailAccess) : mixed
Parameters
- $emailAccess : string
setExpiration()
Set expiration
public
setExpiration(int $expiration) : mixed
Parameters
- $expiration : int
setFrontendLangId()
Set frontendLangId
public
setFrontendLangId(int $frontendLangId) : mixed
Parameters
- $frontendLangId : int
setId()
set id
public
setId(int $id) : mixed
Parameters
- $id : int
setIsAdmin()
Set isAdmin
public
setIsAdmin(int $isAdmin) : mixed
Parameters
- $isAdmin : int
setLastActivity()
Set lastActivity
public
setLastActivity(int $lastActivity) : mixed
Parameters
- $lastActivity : int
setLastAuth()
Set lastAuth
public
setLastAuth(int $lastAuth) : mixed
Parameters
- $lastAuth : int
setLastAuthStatus()
Set lastAuthStatus
public
setLastAuthStatus(int $lastAuthStatus) : mixed
Parameters
- $lastAuthStatus : int
setPassword()
Set password
public
setPassword(string $password) : mixed
Parameters
- $password : string
setPrimaryGroup()
Set primaryGroup
public
setPrimaryGroup(int $primaryGroup) : mixed
Parameters
- $primaryGroup : int
setProfileAccess()
Set profileAccess
public
setProfileAccess(string $profileAccess) : mixed
Parameters
- $profileAccess : string
setRegdate()
Set regdate
public
setRegdate(int $regdate) : mixed
Parameters
- $regdate : int
setRestoreKey()
Set restoreKey
public
setRestoreKey([string $restoreKey = null ]) : mixed
Parameters
- $restoreKey : string = null
setRestoreKeyTime()
Set restoreKeyTime
public
setRestoreKeyTime(int $restoreKeyTime) : mixed
Parameters
- $restoreKeyTime : int
setUsername()
Set username
public
setUsername(string $username) : mixed
Parameters
- $username : string
setUserProfile()
Set userProfile
public
setUserProfile(UserProfile $userProfile) : mixed
Parameters
- $userProfile : UserProfile
setValidity()
Set validity
public
setValidity(int $validity) : mixed
Parameters
- $validity : int
setVerified()
Set verified
public
setVerified(int $verified) : mixed
Parameters
- $verified : int
setVirtual()
Set the virtuality of the entity
public
setVirtual(bool $virtual) : mixed
Parameters
- $virtual : bool
-
TRUE to set the entity as virtual or otherwise to FALSE
validate()
public
validate() : mixed
Tags
getFallbackLocaleCodes()
Returns a list of all locale codes ordered by fallback order
protected
getFallbackLocaleCodes() : array<string|int, mixed>
- First entry is the current locale
- Second entry is the default locale (if different from current, it's omitted otherwise)
- Then all other locales follow (in no particular order)
Tags
Return values
array<string|int, mixed> —List of locale codes
getStringRepresentationBlank()
Whether blank string representations are valid
protected
getStringRepresentationBlank() : bool
Return values
bool —Whether blank string representations are valid
getStringRepresentationFields()
Returns a list of fields available in the string representation
protected
getStringRepresentationFields() : array<string|int, mixed>
Return values
array<string|int, mixed> —List of field names
getStringRepresentationFormat()
Returns the sprintf() format for the string representation
protected
getStringRepresentationFormat() : string
Return values
string —sprintf() format string