Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.
 All Data Structures Functions Variables Pages
Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Static Protected Member Functions
User Class Reference
Inheritance diagram for User:
Permitable Item CustomFieldsModel RedBeanModel BeanModel ObservableComponent

Public Member Functions

 __toString ()
 
 getFullName ()
 
 save ($runValidation=true, array $attributeNames=null)
 
 setPassword ($password)
 
 serializeAndSetAvatarData (Array $avatar)
 
 getAvatarImage ($size=250, $addScheme=false)
 
 getAvatarImageUrl ($size, $addScheme=false)
 
 getActualRight ($moduleName, $rightName)
 
 getPropagatedActualAllowRight ($moduleName, $rightName)
 
 getInheritedActualRight ($moduleName, $rightName)
 
 beforeValidate ()
 
 isUserEmailUnique ($email)
 
 getEmailSignature ()
 
 isDeletable ()
 
 setIsRootUser ()
 
 setIsSystemUser ()
 
 isAllowedToSetReadOnlyAttribute ($attributeName)
 
 setIsNotRootUser ()
 
 setIsNotSystemUser ()
 
 isSuperAdministrator ()
 
- Public Member Functions inherited from Permitable
 contains (Permitable $permitable)
 
 getEffectiveRight ($moduleName, $rightName)
 
 getActualRight ($moduleName, $rightName)
 
 getExplicitActualRight ($moduleName, $rightName)
 
 getPropagatedActualAllowRight ($moduleName, $rightName)
 
 getInheritedActualRight ($moduleName, $rightName)
 
 setRight ($moduleName, $rightName, $type=Right::ALLOW)
 
 removeRight ($moduleName, $rightName, $type=Right::ALLOW)
 
 removeAllRights ()
 
 getEffectivePolicy ($moduleName, $policyName)
 
 getActualPolicy ($moduleName, $policyName)
 
 getExplicitActualPolicy ($moduleName, $policyName)
 
 getInheritedActualPolicy ($moduleName, $policyName)
 
 setPolicy ($moduleName, $policyName, $value)
 
 removePolicy ($moduleName, $policyName)
 
 removeAllPolicies ()
 
- Public Member Functions inherited from Item
 onCreated ()
 
 onModified ()
 
 __set ($attributeName, $value)
 
 delete ()
 
 save ($runValidation=true, array $attributeNames=null)
 
 addWorkflowToProcessAfterSave (Workflow $workflow)
 
 getWorkflowsToProcessAfterSave ()
 
 setDoNotProcessWorkflowOnSave ()
 
 setProcessWorkflowOnSave ()
 
 shouldProcessWorkflowOnSave ()
 
 forgetOriginalAttributeValues ()
 
 testBeforeDelete ()
 
 isAttributeAudited ($attributeName)
 
 isAllowedToSetReadOnlyAttribute ($attributeName)
 
- Public Member Functions inherited from RedBeanModel
 getIsNewModel ()
 
 __construct ($setDefaults=true, RedBean_OODBBean $bean=null, $forceTreatAsCreation=false, $runConstruction=true)
 
 serialize ()
 
 unserialize ($data)
 
 getPrimaryBean ()
 
 getClassId ($modelClassName)
 
 getClassBean ($modelClassName)
 
 getModelIdentifier ()
 
 castDown (array $derivedModelClassNames)
 
 isSame (RedBeanModel $model)
 
 __toString ()
 
 __get ($attributeName)
 
 __set ($attributeName, $value)
 
 __isset ($attributeName)
 
 __unset ($attributeName)
 
 attributeNames ()
 
 isAttribute ($attributeName)
 
 isAttributeWithLowerCaseConversion ($attributeName)
 
 isAttributeReadOnly ($attributeName)
 
 isAttributeFormattedAsProbability ($attributeName)
 
 isAllowedToSetReadOnlyAttribute ($attributeName)
 
 rules ()
 
 behaviors ()
 
 attributeLabels ()
 
 abbreviatedAttributeLabels ()
 
 validate (array $attributeNames=null, $ignoreRequiredValidator=false)
 
 onBeforeValidate (CModelEvent $event)
 
 onAfterValidate ($event)
 
 getValidatorList ()
 
 getValidators ($attributeName=null)
 
 forgetValidators ()
 
 createValidators ()
 
 isUniqueAttributeValue ($attributeName, $value)
 
 save ($runValidation=true, array $attributeNames=null)
 
 isRelatedModelReallyModified ($relatedModel, $relationType, $isOwned)
 
 isReallyModified ($relationType, $isOwned)
 
 onBeforeSave ($event)
 
 onAfterSave ($event)
 
 onRedBeanOneToManyRelatedModelsChange ($event)
 
 onBeforeDelete ($event)
 
 onAfterDelete ($event)
 
 isModified ()
 
 delete ()
 
 isDeleted ()
 
 isDeletable ()
 
 forget ()
 
 isAttributeRequired ($attributeName)
 
 isAttributeSafe ($attributeName)
 
 getAttributeLabel ($attributeName)
 
 getAttributeLabelsForAllActiveLanguagesByAttributeName ($attributeName)
 
 hasErrors ($attributeNameOrNames=null)
 
 getErrors ($attributeNameOrNames=null)
 
 getError ($attributeName)
 
 addError ($attributeName, $errorMessage)
 
 addErrors (array $errors)
 
 clearErrors ($attributeName=null)
 
 generateAttributeLabel ($attributeName)
 
 getAttributes (array $attributeNames=null)
 
 setAttributes (array $values, $safeOnly=true)
 
 unsetAttributes ($attributeNames=null)
 
 onUnsafeAttribute ($name, $value)
 
 getScenario ()
 
 setScenario ($scenarioName)
 
 getSafeAttributeNames ()
 
 getIterator ()
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $item)
 
 offsetUnset ($offset)
 
 stringifyOneToManyRelatedModelsValues ($values)
 
 setIsCopied ()
 
 isCopied ()
 
 addValidator ($attribute, $validator, $params=array())
 
- Public Member Functions inherited from ObservableComponent
 init ()
 
 attachEvents ($events)
 
 events ()
 
 attachEventHandler ($name, $handler)
 
 detachEventHandler ($name, $handler)
 

Static Public Member Functions

static getByUsername ($username)
 
static authenticate ($username, $password)
 
static resolveAuthenticatedUserCanLogin (User $user)
 
static getMixedInModelClassNames ()
 
static getModuleClassName ()
 
static getMetadata ()
 
static setMetadata (array $metadata)
 
static encryptPassword ($password)
 
static hashPassword ($password)
 
static resolvePhpassHashObject ()
 
static mangleTableName ()
 
static canSaveMetadata ()
 
static getDefaultMetadata ()
 
static getActiveUserCount ($includeRootUser=false)
 
static getByCriteria ($active=true, $groupId=null)
 
static getRootUserCount ()
 
static isTypeDeletable ()
 
static getSortAttributesByAttribute ($attribute)
 
static makeActiveUsersQuerySearchAttributeData ($includeRootUser=false)
 
static getActiveUsers ($includeRootUser=false)
 
- Static Public Member Functions inherited from Permitable
static getDefaultMetadata ()
 
static isTypeDeletable ()
 
- Static Public Member Functions inherited from Item
static getDefaultMetadata ()
 
static isTypeDeletable ()
 
static getGamificationRulesType ()
 
static getNonConfigurableAttributes ()
 
static getByName ($name)
 
- Static Public Member Functions inherited from CustomFieldsModel
static getCanHaveBean ()
 
- Static Public Member Functions inherited from RedBeanModel
static model ($className=null)
 
static getAll ($orderBy=null, $sortDescending=false, $modelClassName=null)
 
static getSubset (RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter=null, $offset=null, $count=null, $where=null, $orderBy=null, $modelClassName=null, $selectDistinct=false)
 
static getSubsetIds (RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter=null, $offset=null, $count=null, $where=null, $orderBy=null, $modelClassName=null, $selectDistinct=false)
 
static makeSubsetOrCountSqlQuery ($tableName, RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter, $offset=null, $count=null, $where=null, $orderBy=null, $selectCount=false, $selectDistinct=false, array $quotedExtraSelectColumnNameAndAliases=array())
 
static getCount (RedBeanModelJoinTablesQueryAdapter $joinTablesAdapter=null, $where=null, $modelClassName=null, $selectDistinct=false)
 
static getById ($id, $modelClassName=null)
 
static deleteAll ()
 
static mangleTableName ()
 
static getTableName ()
 
static getTableNames ($classNames)
 
static getForeignKeyName ($modelClassName, $relationName)
 
static getModelClassNameByIdentifier ($identifier)
 
static getMetadata ()
 
static canSaveMetadata ()
 
static setMetadata (array $metadata)
 
static getDefaultMetadata ()
 
static isTypeDeletable ()
 
static forgetAll ()
 
static getModelLabelByTypeAndLanguage ($type, $language=null)
 
static getAnAttributeLabel ($attributeName)
 
static makeModel (RedBean_OODBBean $bean, $modelClassName=null)
 
static makeModels (array $beans, $modelClassName=null)
 
static getModuleClassName ()
 
static getLastClassInBeanHeirarchy ()
 
static getSortAttributesByAttribute ($attribute)
 
static isCacheable ()
 
static getYiiValidatorsToRedBeanValidators ()
 
static getHasManyOpposingRelationName (RedBeanModel $model, $precedingModelClassName, $precedingRelation)
 
static relationLinksToPrecedingRelation ($modelClassName, $relation, $precedingModelClassName=null, $precedingRelation=null)
 
static allowMemcacheCache ()
 
- Static Public Member Functions inherited from BeanModel
static getCanHaveBean ()
 
static getMetadata ()
 
static isAnAttribute ($attributeName)
 
static resolveAttributeModelClassName ($attributeName)
 
static getAttributeModelClassName ($attributeName)
 
static isRelation ($attributeName)
 
static isOwnedRelation ($attributeName)
 
static getRelationType ($relationName)
 
static getRelationModelClassName ($relationName)
 
static getRelationLinkType ($relationName)
 
static getRelationLinkName ($relationName)
 
static isRelationTypeAHasManyVariant ($relationName)
 
static isRelationTypeAHasOneVariant ($relationName)
 
static isADerivedRelationViaCastedUpModel ($relationName)
 
static getDerivedRelationType ($relationName)
 
static getDerivedRelationModelClassName ($relationName)
 
static getDerivedRelationViaCastedUpModelOpposingRelationName ($relationName)
 
static getInferredRelationModelClassNamesForRelation ($relation)
 
static getColumnNameByAttribute ($attributeName)
 
static getAttributeNames ()
 
static generateAnAttributeLabel ($attributeName)
 
static getAbbreviatedAttributeLabel ($attributeName)
 
static getTranslatedAttributeLabels ($language)
 
static getMixedInModelClassNames ()
 
static isRelationTypeAManyManyVariant ($relationName)
 

Data Fields

const AVATAR_TYPE_DEFAULT = 1
 
const AVATAR_TYPE_PRIMARY_EMAIL = 2
 
const AVATAR_TYPE_CUSTOM_EMAIL = 3
 
- Data Fields inherited from Item
 $originalAttributeValues = array()
 
- Data Fields inherited from RedBeanModel
const MODEL_IDENTIFIER_DELIMITER = '_'
 
- Data Fields inherited from BeanModel
const HAS_ONE_BELONGS_TO = 0
 
const HAS_MANY_BELONGS_TO = 1
 
const HAS_ONE = 2
 
const HAS_MANY = 3
 
const MANY_MANY = 4
 
const OWNED = true
 
const NOT_OWNED = false
 
const CACHE_IDENTIFIER = 'BeanModelMapping'
 
const LINK_TYPE_ASSUMPTIVE = 0
 
const LINK_TYPE_SPECIFIC = 1
 
const LINK_TYPE_POLYMORPHIC = 2
 

Protected Member Functions

 constructDerived ($bean, $setDefaults)
 
 unrestrictedDelete ()
 
 linkBeans ()
 
 afterSave ()
 
 beforeSave ()
 
 beforeDelete ()
 
 afterDelete ()
 
 logAuditEventsListForModified ($newModel)
 
 recursiveGetPropagatedActualAllowRight (Role $role, $moduleName, $rightName)
 
 getInheritedActualRightIgnoringEveryone ($moduleName, $rightName)
 
 getInheritedActualPolicyIgnoringEveryone ($moduleName, $policyName)
 
 setIsActive ()
 
 login ()
 
- Protected Member Functions inherited from Permitable
 getInheritedActualRightIgnoringEveryone ($moduleName, $rightName)
 
 onChangeRights ()
 
 afterSave ()
 
 onChangePolicies ()
 
- Protected Member Functions inherited from Item
 beforeSave ()
 
 afterSave ()
 
 logAuditEventsListForModified ($newModel)
 
- Protected Member Functions inherited from CustomFieldsModel
 unrestrictedGet ($attributeName)
 
 constructDerived ($bean, $setDefaults)
 
- Protected Member Functions inherited from RedBeanModel
 constructDerived ($bean, $setDefaults)
 
 constructIncomplete ($bean)
 
 setNotModified ()
 
 onCreated ()
 
 onLoaded ()
 
 onModified ()
 
 mapAndCacheMetadataAndSetHints ($modelClassName, RedBean_OODBBean $bean)
 
 runDefaultValidators ()
 
 setClassBean ($modelClassName, RedBean_OODBBean $bean)
 
 unrestrictedGet ($attributeName)
 
 unrestrictedSet ($attributeName, $value)
 
 beforeValidate ()
 
 afterValidate ()
 
 beforeSave ()
 
 afterSave ()
 
 linkBeans ()
 
 beforeDelete ()
 
 afterDelete ()
 
 unrestrictedDelete ()
 
 deleteOwnedRelatedModels ($modelClassName)
 
 deleteForeignRelatedModels ($modelClassName)
 
 deleteManyManyRelations ($modelClassName)
 

Static Protected Member Functions

static compareWithCurrentPasswordHash ($password, User $user)
 
static translatedAttributeLabels ($language)
 
- Static Protected Member Functions inherited from Item
static getByNameOrEquivalent ($attributeName, $value)
 
static translatedAttributeLabels ($language)
 
- Static Protected Member Functions inherited from RedBeanModel
static makeCasedLinkName ($relationType, $linkType, $relationLinkName)
 
static getModelIdentifierByClassNameAndBeanId ($modelClassName, $beanId)
 
static assertMetadataIsValid (array $metadata)
 
static getByRelatedClassId ($relatedModelClassName, $id, $modelClassName=null)
 
static getLabel ($language=null)
 
static getPluralLabel ($language=null)
 
static getAttributeLabelByLanguage ($attributeName, $language)
 
static getTranslatedCustomAttributeLabelByLanguage ($attributeName, $languageCode)
 
static resolveModelClassNameForClassesWithoutBeans (&$modelClassName)
 
- Static Protected Member Functions inherited from BeanModel
static translatedAbbreviatedAttributeLabels ($language)
 
static translatedAttributeLabels ($language)
 
static getAttributeNamesToClassNamesForModel ()
 
static getAttributeNamesNotBelongsToOrManyManyForModel ()
 
static getRelationNameToRelationTypeModelClassNameAndOwnsForModel ()
 
static getDerivedRelationNameToTypeModelClassNameAndOppposingRelationForModel ()
 
static forgetBeanModel ($modelClassName)
 
static forgetAllBeanModels ()
 
static resolveCacheAndMapMetadataForAllClassesInHeirarchy ()
 
static resolveCachedMetadataForIntegrity ($cachedData)
 
static resolveLinkTypeAndRelationLinkName ($relationTypeModelClassNameAndOwns, &$linkType, &$relationLinkName)
 

Additional Inherited Members

- Protected Attributes inherited from Item
 $isSetting = false
 
 $isAudited = true
 
- Protected Attributes inherited from RedBeanModel
 $modelClassNameToBean = array()
 
 $attributeNameToBeanAndClassName = array()
 
 $relationNameToRelatedModel = array()
 
 $unlinkedRelationNames = array()
 
 $unlinkedOwnedRelatedModelsToRemove = array()
 
 $validators = array()
 
 $attributeNameToErrors = array()
 
 $scenarioName = ''
 
 $modified = false
 
 $deleted = false
 
 $isInIsModified = false
 
 $isInHasErrors = false
 
 $isInGetErrors = false
 
 $isValidating = false
 
 $isSaving = false
 
 $isDeleting = false
 
 $isNewModel = false
 
 $isCopied = false
 
 $isSavableFromRelation = true
 
- Static Protected Attributes inherited from CustomFieldsModel
static $lastClassInBeanHeirarchy = 'CustomFieldsModel'
 
- Static Protected Attributes inherited from RedBeanModel
static $lastClassInBeanHeirarchy = 'RedBeanModel'
 
static $attributeLabelsByLanguage = array()
 
- Static Protected Attributes inherited from BeanModel
static $lastClassInBeanHeirarchy = 'BeanModel'
 

Detailed Description

Definition at line 37 of file User.php.

Member Function Documentation

static getByUsername (   $username)
static
Parameters
string$username
Exceptions
NotFoundException

Definition at line 49 of file User.php.

static authenticate (   $username,
  $password 
)
static

Added fallback for system users to never be able to login

Parameters
$username
$password
Returns
An
Exceptions
NoRightWebLoginException
BadPasswordException
ApiNoRightWebApiLoginException

Definition at line 72 of file User.php.

static compareWithCurrentPasswordHash (   $password,
User  $user 
)
staticprotected

Compare provided password with the hash stored in database.

Parameters
$password
User$user
Returns
bool

Definition at line 93 of file User.php.

static resolveAuthenticatedUserCanLogin ( User  $user)
static

Check if authenticated user can login

Parameters
User$user
Returns
bool
Exceptions
NoRightWebLoginException
ApiNoRightWebApiLoginException

Definition at line 108 of file User.php.

constructDerived (   $bean,
  $setDefaults 
)
protected
Parameters
RedBean_OODBBean$bean
bool$setDefaults

Definition at line 135 of file User.php.

afterSave ( )
protected

If a user is being added to a role, raise two events signaling a potential change in Rights/Policies for this user.

See Also
Permitable::afterSave()

Definition at line 263 of file User.php.

beforeSave ( )
protected

If a user is removed from a role, raise two events signaling a potential change in Rights/Policies for this user.

See Also
Item::beforeSave()

Definition at line 294 of file User.php.

getInheritedActualRight (   $moduleName,
  $rightName 
)
Parameters
string$moduleName
string$rightName
Returns
int

Definition at line 645 of file User.php.

getInheritedActualRightIgnoringEveryone (   $moduleName,
  $rightName 
)
protected
Parameters
string$moduleName
string$rightName
Returns
int|void
Exceptions
NotSupportedException

Definition at line 671 of file User.php.

getInheritedActualPolicyIgnoringEveryone (   $moduleName,
  $policyName 
)
protected
Parameters
string$moduleName
string$policyName
Returns
null

Definition at line 708 of file User.php.

beforeValidate ( )

Check if user's email is unique.

Returns
boolean

Definition at line 855 of file User.php.

isUserEmailUnique (   $email)

Check if user email is unique in system. Two users can't share same email address.

Parameters
string$email
Returns
bool

Definition at line 897 of file User.php.

getEmailSignature ( )

Currently user only supports a single email signature even though the architecture is setup to handle more than one.

Returns
EmailSignature object

Definition at line 1003 of file User.php.

setIsRootUser ( )

Sets the user as the root user only if there is not an existing root user. There is only one root user allowed

Exceptions
NotSupportedException

Definition at line 1033 of file User.php.

setIsActive ( )
protected

to change isActive attribute properly during save

Definition at line 1050 of file User.php.

static getSortAttributesByAttribute (   $attribute)
static

Overriding so when sorting by lastName it sorts bye firstName lastName

Definition at line 1077 of file User.php.

isAllowedToSetReadOnlyAttribute (   $attributeName)

Handle the search scenario for isActive, isRootUser and isSystemUser attributes.

Definition at line 1098 of file User.php.

isSuperAdministrator ( )
Returns
bool
Exceptions
NotSupportedException

Definition at line 1129 of file User.php.

static makeActiveUsersQuerySearchAttributeData (   $includeRootUser = false)
static

Make active users query search attributes data.

Parameters
bool$includeRootUser
Returns
array

Definition at line 1143 of file User.php.

static getActiveUsers (   $includeRootUser = false)
static

Get active users.

Returns
array

Definition at line 1185 of file User.php.


The documentation for this class was generated from the following file:
Generated on Sat Dec 5 2020 07:11:15
Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.