eZ Publish  [trunk]
eZUserType Class Reference

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

+ Inheritance diagram for eZUserType:
+ Collaboration diagram for eZUserType:

List of all members.

Public Member Functions

 classAttributeRemovableInformation ($contentClassAttribute, $includeAll=true)
 deleteStoredObjectAttribute ($contentObjectAttribute, $version=null)
 eZUserType ()
 fetchObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)
 fromString ($contentObjectAttribute, $string)
 Populates the user_account datatype with the correct values based upon the string passed in $string.
 hasObjectAttributeContent ($contentObjectAttribute)
 isIndexable ()
 metaData ($contentObjectAttribute)
 objectAttributeContent ($contentObjectAttribute)
 serializeContentObjectAttribute ($package, $objectAttribute)
 storeObjectAttribute ($contentObjectAttribute)
 title ($contentObjectAttribute, $name="login")
 toString ($contentObjectAttribute)
 Returns the string representation of the attribute passed in $contentObjectAttribute.
 unserializeContentObjectAttribute ($package, $objectAttribute, $attributeNode)
 validateObjectAttributeHTTPInput ($http, $base, $contentObjectAttribute)

Public Attributes

const DATA_TYPE_STRING = "ezuser"

Detailed Description

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

Definition at line 18 of file ezusertype.php.


Member Function Documentation

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 296 of file ezusertype.php.

eZUserType::deleteStoredObjectAttribute ( contentObjectAttribute,
version = null 
)

Delete stored object attribute

Reimplemented from eZDataType.

Definition at line 32 of file ezusertype.php.

Definition at line 22 of file ezusertype.php.

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.

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.no|1234|md5_password|0

Parameters:
object$contentObjectAttributeA contentobject attribute of type user_account.
string$stringThe string as described in the example.
Returns:
object The newly created eZUser object

Reimplemented from eZDataType.

Definition at line 438 of file ezusertype.php.

eZUserType::hasObjectAttributeContent ( contentObjectAttribute)
Returns:
true if the datatype finds any content in the attribute $contentObjectAttribute.

Reimplemented from eZDataType.

Definition at line 262 of file ezusertype.php.

Returns:
true if the datatype can be indexed

Reimplemented from eZDataType.

Definition at line 286 of file ezusertype.php.

eZUserType::metaData ( contentObjectAttribute)

Returns the meta data used for storing search indeces.

Reimplemented from eZDataType.

Definition at line 358 of file ezusertype.php.

eZUserType::objectAttributeContent ( contentObjectAttribute)

Returns the user object.

Reimplemented from eZDataType.

Definition at line 274 of file ezusertype.php.

Referenced by hasObjectAttributeContent(), and title().

eZUserType::serializeContentObjectAttribute ( package,
objectAttribute 
)
Parameters:
package
contentattribute
Returns:
a DOM representation of the content object attribute

Reimplemented from eZDataType.

Definition at line 488 of file ezusertype.php.

eZUserType::storeObjectAttribute ( objectAttribute)

Stores the datatype data to the database which is related to the object attribute.

Returns:
True if the value was stored correctly.
Note:
The method is entirely up to the datatype, for instance it could reuse the available types in the the attribute or store in a separate object.
See also:
fetchObjectAttributeHTTPInput

Reimplemented from eZDataType.

Definition at line 234 of file ezusertype.php.

eZUserType::title ( contentObjectAttribute,
name = "login" 
)

Returns the object title.

Reimplemented from eZDataType.

Definition at line 253 of file ezusertype.php.

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.
  • is_enabled => whether the user is enabled or not, cf the is_enabled field in the ezuser_setting table.

Example: foo|foo.no|1234|md5_password|0

eZUser::isEnabled()

Parameters:
object$contentObjectAttributeA contentobject attribute of type user_account.
Returns:
string The string definition.

Reimplemented from eZDataType.

Definition at line 402 of file ezusertype.php.

eZUserType::unserializeContentObjectAttribute ( package,
objectAttribute,
attributeNode 
)
Parameters:
package
contentobjectattribute object
ezdomnodeobject

Reimplemented from eZDataType.

Definition at line 512 of file ezusertype.php.

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.


Member Data Documentation

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: