wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
User Class Reference
+ Inheritance diagram for User:

Public Member Functions

 User ($oid=null, $type='User')
 
getUser ($login, $password)
 
 getUserId ()
 
 setLogin ($login)
 
 getLogin ()
 
 setPassword ($password)
 
 getPassword ()
 
 setName ($name)
 
 getName ()
 
 setFirstname ($firstname)
 
 getFirstname ()
 
 setConfig ($config)
 
 getConfig ()
 
 addRole ($rolename, $commit=false)
 
 removeRole ($rolename, $commit=false)
 
 hasRole ($rolename)
 
 getRoles ()
 
getRoleByName ($rolename)
 
 resetRoleCache ()
 
- Public Member Functions inherited from Node
 Node ($type, $oid=null)
 
 getNumChildren ($memOnly=true, $type=null)
 
 addChild (&$child, $addtype=ADDCHILD_BACK)
 
 updateParent (&$parent, $recursive=true)
 
 deleteChild ($childOID, $reallyDelete=false)
 
 loadChildren ($type, $buildDepth=BUILDDEPTH_SINGLE, $forceUpdate=false)
 
getFirstChild ($type, $values, $properties, $useRegExp=true)
 
 getChildren ()
 
 getChildrenEx ($oid, $type, $values, $properties, $useRegExp=true)
 
 sortChildren ($criteria, $recursive=false, $changeSortkey=false, $sortFunction='')
 
 sort (&$nodeList, $criteria, $recursive=false, $changeSortkey=false, $sortFunction='')
 
 filter (&$nodeList, $oid, $type, $values, $properties, $useRegExp=true)
 
 getNextSibling ()
 
 getPreviousSibling ()
 
 loadParents ($type, $forceUpdate=false)
 
 getNumParents ($memOnly=true, $type=null)
 
getParent ()
 
getFirstParent ($type, $values, $properties, $useRegExp=true)
 
getParents ()
 
 getParentsEx ($oid, $type, $values, $properties, $useRegExp=true)
 
 getDepth ()
 
 getPath ()
 
 acceptVisitor (&$visitor)
 
 setState ($state, $recursive=true)
 
 removeDuplicateOidsWithoutRole ($oids)
 
 getDisplayValue ($useDisplayType=false)
 
 getDisplayValues ($useDisplayType=false)
 
 toString ($verbose=false)
 
- Public Member Functions inherited from PersistentObject
 PersistentObject ($type, $oid=null)
 
 getType ()
 
 setType ($type)
 
 getBaseType ()
 
 getOID ()
 
 getBaseOID ()
 
 setOID ($oid)
 
 getDBID ()
 
 setDBID ($id)
 
getMapper ()
 
getDataConverter ()
 
 save ()
 
 delete ($recursive=true)
 
 getState ()
 
 setState ($state, $recursive=true)
 
 setImmutable ()
 
 getLock ()
 
duplicate ()
 
 copyValues (&$object, $dataTypes=array(), $copyPkValues=true)
 
 copyValueIntern (&$node, $valueName, $dataType, &$targetNode, $dataTypes, $valuesToIgnore)
 
 clearValues ($dataTypes=array())
 
 clearValueIntern (&$node, $valueName, $dataType, $dataTypes)
 
 updateOID ()
 
 afterCreate ()
 
 beforeInsert ()
 
 afterInsert ()
 
 afterLoad ()
 
 beforeUpdate ()
 
 afterUpdate ()
 
 beforeDelete ()
 
 afterDelete ()
 
 hasValue ($name, $type=null)
 
 getValue ($name, $type=null)
 
 removeValue ($name, $type=null)
 
 getUnconvertedValue ($name, $type=null)
 
 getConvertedValue ($name, $type=null)
 
 getValueTypes ($name)
 
 validateValues ()
 
 validateValueIntern (&$node, $valueName, $dataType, &$errorMsg)
 
 validateValue ($name, $value, $type=null)
 
 validateValueAgainstRestrictions ($name, $value, $type=null)
 
 setValue ($name, $value, $type=null, $forceSet=false)
 
 getValueProperties ($name, $type=null)
 
 setValueProperties ($name, $properties, $type=null)
 
 getValueProperty ($name, $property, $type=null)
 
 setValueProperty ($name, $property, $value, $type=null)
 
 getValueNames ($type=null)
 
 getDataTypes ()
 
 getProperty ($name)
 
 setProperty ($name, $value)
 
 getPropertyNames ()
 
 addChangeListener (&$listener)
 
 removeChangeListener (&$listener)
 
 propagateValueChange ($name, $type, $oldValue, $newValue)
 
 propagatePropertyChange ($name, $oldValue, $newValue)
 
 propagateStateChange ($oldValue, $newValue)
 
 getObjectDisplayName ()
 
 getObjectDescription ()
 
 getDisplayValue ()
 
 getValueDisplayName ($name, $type=null)
 
 getValueDescription ($name, $type=null)
 
 toString ($verbose=false)
 
 isIndexInSearch ()
 
- Public Member Functions inherited from Storable
 getClassDefinitionFiles ()
 
 loadFromSession ()
 
 saveToSession ()
 

Public Attributes

 $_cachedRoles = array()
 
 $_hasOwnRolesLoaded = false
 
- Public Attributes inherited from Node
 $_children = array()
 
 $_parents = array()
 
 $_depth = -1
 
 $_path = ''
 
- Public Attributes inherited from PersistentObject
 $_oid = null
 
 $_type = ''
 
 $_data = array()
 
 $_properties = array()
 
 $_state = STATE_CLEAN
 
 $_isImmutable = false
 
 $_changeListeners = array()
 

Detailed Description

Abstract base class for user classes that represent a system user.

Implementation of a XML system user.

Implementation of a system user.

wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH

Licensed under the terms of any of the following licenses at your choice:

See the license.txt file distributed with this work for additional information.

Id:
class.User.php 1462 2014-02-04 23:52:27Z iherwig
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH

Licensed under the terms of any of the following licenses at your choice:

See the license.txt file distributed with this work for additional information.

Id:
class.UserImpl.php 1462 2014-02-04 23:52:27Z iherwig
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH

Licensed under the terms of any of the following licenses at your choice:

See the license.txt file distributed with this work for additional information.

Id:
class.UserXML.php 1462 2014-02-04 23:52:27Z iherwig
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 31 of file class.User.php.

Member Function Documentation

User::User (   $oid = null,
  $type = 'User' 
)

Default constructor.

Definition at line 39 of file class.User.php.

& User::getUser (   $login,
  $password 
)

Get the user instance by login and password. The default implementation searches the user using the PersistenceFacade. This method may be called in a static way. Subclasses will override this to implement special retrieval.

Returns
A reference to the instance or null if not found.

Definition at line 51 of file class.User.php.

References BUILDDEPTH_SINGLE, PersistenceFacade\getInstance(), and UserManager\getUserClassName().

+ Here is the call graph for this function:

User::getUserId ( )

Get the id of the user.

Returns
The id.

Definition at line 70 of file class.User.php.

References PersistentObject\getDBID().

+ Here is the call graph for this function:

User::setLogin (   $login)

Set the login of the user.

Parameters
loginThe login of the user.

Definition at line 79 of file class.User.php.

References WCMFException\throwEx().

+ Here is the call graph for this function:

User::getLogin ( )

Get the login of the user.

Returns
The login of the user.

Definition at line 88 of file class.User.php.

References WCMFException\throwEx().

+ Here is the call graph for this function:

User::setPassword (   $password)

Set the password of the user.

Parameters
passwordThe unencrypted password of the user.

Definition at line 97 of file class.User.php.

References WCMFException\throwEx().

+ Here is the call graph for this function:

User::getPassword ( )

Get the password of the user.

Returns
The unencrypted password of the user.

Definition at line 106 of file class.User.php.

References WCMFException\throwEx().

+ Here is the call graph for this function:

User::setName (   $name)

Set the name of the user.

Parameters
nameThe name of the user.

Definition at line 115 of file class.User.php.

References WCMFException\throwEx().

+ Here is the call graph for this function:

User::getName ( )

Get name of the user.

Returns
The name of the user.

Definition at line 124 of file class.User.php.

References WCMFException\throwEx().

Referenced by hasRole().

+ Here is the call graph for this function:

User::setFirstname (   $firstname)

Set the firstname of the user.

Parameters
firstnameThe firstname of the user.

Definition at line 133 of file class.User.php.

References WCMFException\throwEx().

+ Here is the call graph for this function:

User::getFirstname ( )

Get the firstname of the user.

Returns
The firstname of the user.

Definition at line 142 of file class.User.php.

References WCMFException\throwEx().

+ Here is the call graph for this function:

User::setConfig (   $config)

Set the configuration file of the user.

Parameters
configThe configuration file of the user.

Definition at line 151 of file class.User.php.

References WCMFException\throwEx().

+ Here is the call graph for this function:

User::getConfig ( )

Get the configuration file of the user.

Returns
The configuration file of the user.

Definition at line 160 of file class.User.php.

References WCMFException\throwEx().

+ Here is the call graph for this function:

User::addRole (   $rolename,
  $commit = false 
)

Assign a role to the user.

Parameters
rolenameThe role name. e.g. "administrators"
commitTrue/False wether to commit the changes or not [default: false].

Definition at line 170 of file class.User.php.

References Node\addChild(), getRoleByName(), and hasRole().

+ Here is the call graph for this function:

User::removeRole (   $rolename,
  $commit = false 
)

Remove a role from the user.

Parameters
rolenameThe role name. e.g. "administrators"
commitTrue/False wether to commit the changes or not [default: false].

Definition at line 194 of file class.User.php.

References Node\deleteChild(), getRoleByName(), and hasRole().

+ Here is the call graph for this function:

User::hasRole (   $rolename)

Check for a certain role in the user roles.

Parameters
rolenameThe role name to check for. e.g. "administrators"
Returns
True/False whether the user has the role

Definition at line 222 of file class.User.php.

References getName(), and getRoles().

Referenced by addRole(), and removeRole().

+ Here is the call graph for this function:

User::getRoles ( )

Get the roles of a user.

Returns
An array holding the role names

Definition at line 235 of file class.User.php.

References Node\getChildrenEx(), RightsManager\getInstance(), UserManager\getRoleClassName(), and Node\loadChildren().

Referenced by hasRole().

+ Here is the call graph for this function:

& User::getRoleByName (   $rolename)

Get a Role instance whose name is given

Parameters
rolenameThe name of the role
Returns
A reference to the role or null if nor existing

Definition at line 263 of file class.User.php.

References BUILDDEPTH_SINGLE, PersistenceFacade\getInstance(), and UserManager\getRoleClassName().

Referenced by addRole(), and removeRole().

+ Here is the call graph for this function:

User::resetRoleCache ( )

This class caches loaded roles for performance reasons. After retrieving an instance from the session, the cache is invalid and must be reseted using this method.

Definition at line 283 of file class.User.php.

Member Data Documentation

User::$_cachedRoles = array()

Definition at line 33 of file class.User.php.

User::$_hasOwnRolesLoaded = false

Definition at line 34 of file class.User.php.


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