wCMF
3.6
|
Public Member Functions | |
login ($login, $password, $isPasswordEncrypted=false) | |
addPolicies ($policies) | |
authorize ($actionKey) | |
matchRoles ($val) | |
parsePolicy ($val) | |
setDefaultPolicy ($val) | |
getLoginTime () | |
toString () | |
getType () | |
setLogin ($login) | |
getLogin () | |
setPassword ($password) | |
getPassword () | |
setName ($name) | |
getName () | |
setFirstname ($firstname) | |
getFirstname () | |
setConfig ($config) | |
getConfig () | |
addRole ($rolename) | |
removeRole ($rolename) | |
hasRole ($rolename) | |
getRoles () | |
getClassDefinitionFiles () | |
loadFromSession () | |
Public Member Functions inherited from User | |
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 | |
$_login_time = "" | |
$_policies = array() | |
$_defaulPolicy = true | |
$_user = null | |
Public Attributes inherited from User | |
$_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() | |
AuthUser provides a storage and methods for user data used for authentication/authorization purposes. This class requires php >= 4.1.0.
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.
Definition at line 34 of file class.AuthUser.php.
AuthUser::login | ( | $login, | |
$password, | |||
$isPasswordEncrypted = false |
|||
) |
Log a user into the application.
login | The login string of the user |
password | The password string of the user |
isPasswordEncrypted | True/False wether the password is encrypted or not [default: false] |
Definition at line 48 of file class.AuthUser.php.
References $GLOBALS, addPolicies(), BUILDDEPTH_SINGLE, UserManager\encryptPassword(), getConfig(), PersistenceFacade\getInstance(), InifileParser\getInstance(), RightsManager\getInstance(), UserManager\getUserClassName(), PersistentObject\setOID(), and WCMFException\throwEx().
AuthUser::addPolicies | ( | $policies | ) |
Adds one ore more policies to the policy repository of the user.
policies | An associative array with the policy information (key=action, value=policy string). |
Definition at line 106 of file class.AuthUser.php.
References parsePolicy().
Referenced by login().
AuthUser::authorize | ( | $actionKey | ) |
Checks, if the user is authorized for this action. Returns defaulPolicy if action key is not defined.
actionKey | An action key string |
Definition at line 124 of file class.AuthUser.php.
References $_defaulPolicy, and matchRoles().
AuthUser::matchRoles | ( | $val | ) |
Matches the roles of the user and the roles for a certain key
val | An array containing policy information as an associative array with the keys ('default', 'allow', 'deny'). Where 'allow', 'deny' are arrays itselves holding roles. 'allow' overwrites 'deny' overwrites 'default' |
Definition at line 141 of file class.AuthUser.php.
References hasRole().
Referenced by authorize().
AuthUser::parsePolicy | ( | $val | ) |
Parse an policy string and returns an associative array with the keys ('default', 'allow', 'deny'). Where 'allow', 'deny' are arrays itselves holding roles. 'deny' overwrites 'allow' overwrites 'default'
val | An role string (+*, +admin, -guest, entries without '+' or '-' prefix default to allow rules). |
Definition at line 162 of file class.AuthUser.php.
Referenced by addPolicies(), and RightsManager\getRight().
AuthUser::setDefaultPolicy | ( | $val | ) |
Assign the default policy.
val | A boolean value. |
Definition at line 197 of file class.AuthUser.php.
AuthUser::getLoginTime | ( | ) |
Get login time of the user.
Definition at line 206 of file class.AuthUser.php.
References $_login_time.
AuthUser::toString | ( | ) |
Get a string representation of the user.
Definition at line 215 of file class.AuthUser.php.
AuthUser::getType | ( | ) |
Implementation of abstract base class methods. Delegates to internal user instance. Get the type
Definition at line 230 of file class.AuthUser.php.
References UserManager\getUserClassName().
AuthUser::setLogin | ( | $login | ) |
Definition at line 238 of file class.AuthUser.php.
AuthUser::getLogin | ( | ) |
Definition at line 247 of file class.AuthUser.php.
AuthUser::setPassword | ( | $password | ) |
Definition at line 257 of file class.AuthUser.php.
AuthUser::getPassword | ( | ) |
Definition at line 266 of file class.AuthUser.php.
AuthUser::setName | ( | $name | ) |
Definition at line 276 of file class.AuthUser.php.
AuthUser::getName | ( | ) |
Definition at line 285 of file class.AuthUser.php.
AuthUser::setFirstname | ( | $firstname | ) |
Definition at line 295 of file class.AuthUser.php.
AuthUser::getFirstname | ( | ) |
Definition at line 304 of file class.AuthUser.php.
AuthUser::setConfig | ( | $config | ) |
Definition at line 314 of file class.AuthUser.php.
AuthUser::getConfig | ( | ) |
AuthUser::addRole | ( | $rolename | ) |
Definition at line 335 of file class.AuthUser.php.
AuthUser::removeRole | ( | $rolename | ) |
Definition at line 343 of file class.AuthUser.php.
AuthUser::hasRole | ( | $rolename | ) |
Definition at line 351 of file class.AuthUser.php.
Referenced by matchRoles().
AuthUser::getRoles | ( | ) |
Definition at line 362 of file class.AuthUser.php.
AuthUser::getClassDefinitionFiles | ( | ) |
Implementation of the storable interface.
Definition at line 377 of file class.AuthUser.php.
References ObjectFactory\getInstance(), InifileParser\getInstance(), and WCMFException\throwEx().
AuthUser::loadFromSession | ( | ) |
Definition at line 397 of file class.AuthUser.php.
AuthUser::$_login_time = "" |
Definition at line 36 of file class.AuthUser.php.
Referenced by getLoginTime().
AuthUser::$_policies = array() |
Definition at line 37 of file class.AuthUser.php.
AuthUser::$_defaulPolicy = true |
Definition at line 38 of file class.AuthUser.php.
Referenced by authorize().
AuthUser::$_user = null |
Definition at line 39 of file class.AuthUser.php.