Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | List of all members
eZUserType Class Reference

The class eZUserType handles user accounts and association with content objects. More...

Inheritance diagram for eZUserType:

## Public Member Functions
| __construct ()
| deleteStoredObjectAttribute ( $contentObjectAttribute, $version=null)
| validateObjectAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| fetchObjectAttributeHTTPInput ( $http, $base, $contentObjectAttribute)
| title ( $contentObjectAttribute, $name="login")
| hasObjectAttributeContent ( $contentObjectAttribute)
| objectAttributeContent ( $contentObjectAttribute)
| isIndexable ()
| classAttributeRemovableInformation ( $contentClassAttribute, $includeAll=true)
| metaData ( $contentObjectAttribute)
| toString ( $contentObjectAttribute)
| fromString ( $contentObjectAttribute, $string)
| serializeContentObjectAttribute ( $package, $objectAttribute)
| unserializeContentObjectAttribute ( $package, $objectAttribute, $attributeNode)
Public Member Functions inherited from eZDataType
| __construct ( $dataTypeString, $name, $properties=array())
| eZDataType ( $dataTypeString, $name, $properties=array())
| viewTemplate ( $contentobjectAttribute)
| editTemplate ( $contentobjectAttribute)
| informationTemplate ( $contentobjectAttribute)
| resultTemplate (&$collectionAttribute)
| isA ()
| isTranslatable ()
| attributes ()
| hasAttribute ( $attr)
| attribute ( $attr)
| isHTTPFileInsertionSupported ()
| isRegularFileInsertionSupported ()
| isSimpleStringInsertionSupported ()
| isRelationType ()
| insertHTTPFile ( $object, $objectVersion, $objectLanguage, $objectAttribute, $httpFile, $mimeData, &$result)
| insertRegularFile ( $object, $objectVersion, $objectLanguage, $objectAttribute, $filePath, &$result)
| insertSimpleString ( $object, $objectVersion, $objectLanguage, $objectAttribute, $string, &$result)
| hasStoredFileInformation ( $object, $objectVersion, $objectLanguage, $objectAttribute)
| handleDownload ( $object, $objectVersion, $objectLanguage, $objectAttribute)
| storedFileInformation ( $object, $objectVersion, $objectLanguage, $objectAttribute)
| productOptionInformation ( $objectAttribute, $optionID, $productItem)
| objectDisplayInformation ( $objectAttribute, $mergeInfo=false)
| classDisplayInformation ( $classAttribute, $mergeInfo=false)
| classAttributeContent ( $classAttribute)
| storeObjectAttribute ( $objectAttribute)
| onPublish ( $contentObjectAttribute, $contentObject, $publishedNodes)
| preStoreClassAttribute ( $classAttribute, $version)
| storeClassAttribute ( $classAttribute, $version)
| storeDefinedClassAttribute ( $classAttribute)
| storeModifiedClassAttribute ( $classAttribute)
| storeVersionedClassAttribute ( $classAttribute, $version)
| preStoreDefinedClassAttribute ( $classAttribute)
| preStoreModifiedClassAttribute ( $classAttribute)
| preStoreVersionedClassAttribute ( $classAttribute, $version)
| validateClassAttributeHTTPInput ( $http, $base, $classAttribute)
| fixupClassAttributeHTTPInput ( $http, $base, $classAttribute)
| fetchClassAttributeHTTPInput ( $http, $base, $classAttribute)
| customClassAttributeHTTPAction ( $http, $action, $classAttribute)
| fetchActionValue ( $action, $actionName, &$value)
| fixupObjectAttributeHTTPInput ( $http, $base, $objectAttribute)
| validateCollectionAttributeHTTPInput ( $http, $base, $objectAttribute)
| fixupCollectionAttributeHTTPInput ( $http, $base, $objectAttribute)
| fetchCollectionAttributeHTTPInput ( $collection, $collectionAttribute, $http, $base, $objectAttribute)
| customObjectAttributeHTTPAction ( $http, $action, $objectAttribute, $parameters)
| handleCustomObjectHTTPActions ( $http, $attributeDataBaseName, $customActionAttributeArray, $customActionParameters)
| initializeClassAttribute ( $classAttribute)
| cloneClassAttribute ( $oldClassAttribute, $newClassAttribute)
| initializeObjectAttribute ( $objectAttribute, $currentVersion, $originalContentObjectAttribute)
| repairContentObjectAttribute ( $contentObjectAttribute)
| postInitializeObjectAttribute ( $objectAttribute, $currentVersion, $originalContentObjectAttribute)
| postStore ( $objectAttribute)
| trashStoredObjectAttribute ( $objectAttribute, $version=null)
| restoreTrashedObjectAttribute ( $objectAttribute)
| deleteStoredClassAttribute ( $classAttribute, $version=null)
| deleteNotVersionedStoredClassAttribute (eZContentClassAttribute $classAttribute)
| contentActionList ( $classAttribute)
| hasInformationCollection ()
| isAddToBasketValidationRequired ()
| validateAddToBasket ( $objectAttribute, $data, &$errors)
| isClassAttributeRemovable ( $classAttribute)
| isInformationCollector ()
| sortKey ( $objectAttribute)
| sortKeyType ()
| customSorting ()
| customSortingSQL ( $params)
| templateList ()
| serializeContentClassAttribute ( $classAttribute, $attributeNode, $attributeParametersNode)
| unserializeContentClassAttribute ( $classAttribute, $attributeNode, $attributeParametersNode)
| postUnserializeContentObjectAttribute ( $package, $objectAttribute)
| removeRelatedObjectItem ( $contentObjectAttribute, $objectID)
| fixRelatedObjectItem ( $contentObjectAttribute, $objectID, $mode)
| createContentObjectAttributeDOMNode ( $objectAttribute)
| diff ( $old, $new, $options=false)
| getDBAFileName ()
| getDBAFilePath ( $checkExtensions=true)
| getDBAExtensionFilePath ()
| importDBDataFromDBAFile ( $dbaFilePath=false)
| batchInitializeObjectAttributeData ( $classAttribute)
| supportsBatchInitializeObjectAttribute ()

## Static Public Member Functions
static | serializeDraft (eZUser $user)
Static Public Member Functions inherited from eZDataType
static | create ( $dataTypeString)
static | registeredDataTypes ()
static | register ( $dataTypeString, $className)
static | allowedTypes ()
static | loadAndRegisterAllTypes ()
static | loadAndRegisterType ( $type)

## Public Attributes
const | DATA_TYPE_STRING = "ezuser"
Public Attributes inherited from eZDataType
| $Attributes
| $DataTypeString
| The datatype string ID, used for uniquely identifying a datatype. More...
| $Name
| The descriptive name of the datatype, usually used for displaying to the user. More...

## Private Member Functions
| unserializeDraft ( $serializedDraft)
| updateUserDraft (eZUser $user, $serializedDraft)

## Detailed Description

The class eZUserType handles user accounts and association with content objects.

Definition at line 18 of file ezusertype.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZUserType::__construct | ( |  | ) |

Definition at line 22 of file ezusertype.php.

References ezpI18n\tr().

## Member Function Documentation

## ◆ classAttributeRemovableInformation()

eZUserType::classAttributeRemovableInformation | ( |  | $contentClassAttribute,
|  |  | $includeAll = `true`
| ) |  |

We can only remove the user attribute if:

- The current user, anonymous user and administrator user is not using this class
- There are more classes with the ezuser datatype

Reimplemented from eZDataType.

Definition at line 405 of file ezusertype.php.

References eZUser\currentUser(), eZDB\instance(), and ezpI18n\tr().

## ◆ deleteStoredObjectAttribute()

eZUserType::deleteStoredObjectAttribute | ( |  | $contentObjectAttribute,
|  |  | $version = `null`
| ) |  |

Delete stored object attribute

Reimplemented from eZDataType.

Definition at line 32 of file ezusertype.php.

References eZUser\fetch(), eZDB\instance(), and eZUser\removeUser().

## ◆ fetchObjectAttributeHTTPInput()

eZUserType::fetchObjectAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $contentObjectAttribute
| ) |  |

Fetches the http post var integer input and stores it in the data instance.

Reimplemented from eZDataType.

Definition at line 179 of file ezusertype.php.

References eZUser\create(), and eZDebugSetting\writeDebug().

## ◆ fromString()

eZUserType::fromString | ( |  | $contentObjectAttribute,
|  |  | $string
| ) |  |

Populates the user_account datatype with the correct values based upon the string passed in $string.

The string that must be passed looks like the following : login|email|password_hash|hash_identifier|is_enabled

Example: `foo|foo@ez.no|1234|md5_password|0`

Parameters

  object | $contentObjectAttribute | A contentobject attribute of type user_account.
  string | $string | The string as described in the example.

Returns
  object The newly created eZUser object

Reimplemented from eZDataType.

Definition at line 547 of file ezusertype.php.

References eZUser\create(), eZUserSetting\fetch(), eZUser\fetchByEmail(), eZUser\fetchByName(), eZUser\passwordHashTypeID(), and eZUser\requireUniqueEmail().

## ◆ hasObjectAttributeContent()

eZUserType::hasObjectAttributeContent | ( |  | $contentObjectAttribute | ) |

Returns
  `true` if the datatype finds any content in the attribute $contentObjectAttribute.

Reimplemented from eZDataType.

Definition at line 361 of file ezusertype.php.

References objectAttributeContent().

## ◆ isIndexable()

eZUserType::isIndexable | ( |  | ) |

Returns
  true if the datatype can be indexed

Reimplemented from eZDataType.

Definition at line 395 of file ezusertype.php.

## ◆ metaData()

eZUserType::metaData | ( |  | $contentObjectAttribute | ) |

Returns the meta data used for storing search indeces.

Reimplemented from eZDataType.

Definition at line 467 of file ezusertype.php.

## ◆ objectAttributeContent()

eZUserType::objectAttributeContent | ( |  | $contentObjectAttribute | ) |

Returns the user object.

Reimplemented from eZDataType.

Definition at line 373 of file ezusertype.php.

References eZUser\fetch(), updateUserDraft(), and eZDebugSetting\writeDebug().

Referenced by hasObjectAttributeContent(), and title().

## ◆ serializeContentObjectAttribute()

eZUserType::serializeContentObjectAttribute | ( |  | $package,
|  |  | $objectAttribute
| ) |  |

Parameters

  package |
  content | attribute

Returns
  a DOM representation of the content object attribute

Reimplemented from eZDataType.

Definition at line 597 of file ezusertype.php.

References eZDataType\createContentObjectAttributeDOMNode(), eZUser\fetch(), and eZUser\passwordHashTypeName().

## ◆ serializeDraft()

static eZUserType::serializeDraft | ( | eZUser | $user | ) |
| static

Generates a serialized draft of the ezuser content

Parameters

  eZUser | $user |

Returns
  string

Definition at line 304 of file ezusertype.php.

References eZPersistentObject\attribute().

## ◆ title()

eZUserType::title | ( |  | $contentObjectAttribute,
|  |  | $name = `"login"`
| ) |  |

Returns the object title.

Reimplemented from eZDataType.

Definition at line 352 of file ezusertype.php.

References objectAttributeContent().

## ◆ toString()

eZUserType::toString | ( |  | $contentObjectAttribute | ) |

Returns the string representation of the attribute passed in $contentObjectAttribute.

The string definition will looks like this : login|email|password_has|hash_identifier|is_enabled where :

- login => user login cf : the login field in the ezuser table.
- email => user email cf : the email table field in the ezuser table.
- password_hash => use password hash, cf password_hash field in the ezuser table.
- hash_identifier => one of the hash name available in eZUser::passwordHashTypeName()
- is_enabled => whether the user is enabled or not, cf the is_enabled field in the ezuser_setting table.

Example: `foo|foo@ez.no|1234|md5_password|0`

@uses eZUser::isEnabled()

Parameters

  object | $contentObjectAttribute | A contentobject attribute of type user_account.

Returns
  string The string definition.

Reimplemented from eZDataType.

Definition at line 511 of file ezusertype.php.

References eZUser\fetch(), and eZUser\passwordHashTypeName().

## ◆ unserializeContentObjectAttribute()

eZUserType::unserializeContentObjectAttribute | ( |  | $package,
|  |  | $objectAttribute,
|  |  | $attributeNode
| ) |  |

Parameters

  package |
  contentobject | attribute object
  ezdomnode | object

Reimplemented from eZDataType.

Definition at line 621 of file ezusertype.php.

References eZUser\create(), eZUser\fetch(), and eZUser\passwordHashTypeID().

## ◆ unserializeDraft()

eZUserType::unserializeDraft | ( |  | $serializedDraft | ) |
| private

Unserialize draft data generated with serializeDraft()

Parameters

  $serializedDraft |

Returns
  mixed

Definition at line 322 of file ezusertype.php.

Referenced by updateUserDraft().

## ◆ updateUserDraft()

eZUserType::updateUserDraft | ( | eZUser | $user,
|  |  | $serializedDraft
| ) |  |
| private

Updates ezuser with data generated with getSerializedDraft()

Parameters

  eZUser | $user |
  | $serializedDraft |

Returns
  eZUser updated user

Definition at line 334 of file ezusertype.php.

References eZPersistentObject\setAttribute(), and unserializeDraft().

Referenced by objectAttributeContent().

## ◆ validateObjectAttributeHTTPInput()

eZUserType::validateObjectAttributeHTTPInput | ( |  | $http,
|  |  | $base,
|  |  | $contentObjectAttribute
| ) |  |

Validates the input and returns true if the input was valid for this datatype.

Reimplemented from eZDataType.

Definition at line 52 of file ezusertype.php.

References eZUser\AUTHENTICATE_EMAIL, eZUser\authenticationMatch(), eZUser\fetchByEmail(), eZUser\fetchByName(), eZUser\requireUniqueEmail(), eZInputValidator\STATE_ACCEPTED, eZInputValidator\STATE_INVALID, ezpI18n\tr(), eZMail\validate(), eZUser\validateLoginName(), and eZUser\validatePassword().

## Member Data Documentation

## ◆ DATA_TYPE_STRING

const eZUserType::DATA_TYPE_STRING = "ezuser"

Definition at line 20 of file ezusertype.php.

Referenced by eZUser\isUserObject().

The documentation for this class was generated from the following file:

- ezusertype.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.