|
eZ Publish
[trunk]
|
eZUser handles eZ Publish user accounts More...
Inheritance diagram for eZUser:
Collaboration diagram for eZUser:Public Member Functions | |
| accessArray () | |
| Returns either cached or newly generated accessArray for the user depending on site.ini\[RoleSettings] setting. | |
| accountKey () | |
| Returns the eZUserAccountKey associated with this user. | |
| canAssignSection ($checkSectionID) | |
| canAssignSectionList () | |
| canAssignSectionToClassList ($checkSectionID) | |
| canAssignSectionToObject ($checkSectionID, $contentObject) | |
| canAssignToObjectSectionList ($contentObject) | |
| canLoginToSiteAccess ($access) | |
| checkUser (&$siteBasics, $uri) | |
| contentObject () | |
| eZUser ($row=array()) | |
| failedLoginAttempts () | |
| forceLogin () | |
| generateAccessArray () | |
| Generates the accessArray for the user (for $this). | |
| getUserCache () | |
| Get User cache from cache file. | |
| groups ($asObject=false) | |
| hasAccessTo ($module, $function=false) | |
| hasAccessToView ($module, $viewName, &$params) | |
| hasManageLocations () | |
| hasStoredLogin () | |
| id () | |
| isAnonymous () | |
| isEnabled () | |
| isLocked () | |
| isLoggedIn () | |
| lastVisit () | |
| limitList ($useGroupsCache=true) | |
| limitValueList () | |
| loginCount () | |
| Returns the login count for the current user. | |
| loginCurrent () | |
| loginURI () | |
| originalPassword () | |
| originalPasswordConfirm () | |
| postCollectUserInfo () | |
| preCollectUserInfo () | |
| purgeUserCache () | |
| Delete User cache from locale var and cache file for current user. | |
| roleIDList () | |
| roles () | |
| sessionCleanup () | |
| setInformation ($id, $login, $email, $password, $passwordConfirm=false) | |
| setOriginalPassword ($password) | |
| setOriginalPasswordConfirm ($password) | |
| setUserCache (array $userCache) | |
| Set User cache from cache file Needs to be in excact same format as eZUser::getUserCache()! | |
| store ($fieldFilters=null) | |
| Stores the object in the database, uses storeObject() to do the actual job and passes $fieldFilters to it. | |
Static Public Member Functions | |
| static | anonymousId () |
| Gets the id of the anonymous user. | |
| static | authenticateHash ($user, $password, $site, $type, $hash) |
| static | authenticationMatch () |
| static | cleanup () |
| Cleanup user related session values, for use by login / logout code. | |
| static | cleanupCache () |
| Expire user access / info cache globally. | |
| static | clearSessionCache () |
| static | contentClassIDs () |
| static | create ($contentObjectID) |
| static | createHash ($user, $password, $site, $type, $hash=false) |
| static | createPassword ($passwordLength, $seed=false) |
| static | currentUser () |
| static | currentUserID () |
| static | definition () |
| Returns the definition for the object, the default implementation is to return an empty array. | |
| static | failedLoginAttemptsByUserID ($userID) |
| static | fetch ($id, $asObject=true) |
| static | fetchAnonymousCount () |
| Return the number of anonymous users in the system. | |
| static | fetchBuiltin ($id) |
| static | fetchByEmail ($email, $asObject=true) |
| static | fetchByName ($login, $asObject=true) |
| static | fetchContentList () |
| static | fetchLoggedInCount () |
| static | fetchLoggedInList ($asObject=false, $offset=false, $limit=false, $sortBy=false) |
| static | fetchUnactivated ($sort=false, $limit=10, $offset=0) |
| Return an array of unactivated eZUser object. | |
| static | fetchUserClassList ($asObject=false, $fields=false) |
| static | fetchUserClassNames () |
| static | fetchUserGroupClassNames () |
| static | generateUserCacheForFile ($filePath, $userId) |
| Callback which generates user cache for user. | |
| static | getCacheDir ($userId=0) |
| Creates the cache path if it doesn't exist, and returns the cache directory. | |
| static | getCacheFilename ($userId) |
| Returns the filename for a cache file with user information. | |
| static | getUserCacheByAnonymousId () |
| Get User cache from cache file for Anonymous user(usefull for sessionless users) | |
| static | hashType () |
| static | instance ($id=false) |
| Returns a shared instance of the eZUser class pr $id value. | |
| static | isEnabledAfterFailedLogin ($userID, $ignoreTrusted=false) |
| static | isTrusted () |
| static | isUserIPInList ($ipList) |
| static | isUserLoggedIn ($userID) |
| static | isUserObject ($contentObject) |
| static | loginUser ($login, $password, $authenticationMatch=false) |
| Logs in the user if applied username and password is valid. | |
| static | logoutCurrent () |
| static | maxNumberOfFailedLogin () |
| static | passwordCharacterTable () |
| static | passwordHashTypeID ($identifier) |
| static | passwordHashTypeName ($id) |
| static | purgeUserCacheByAnonymousId () |
| Delete User cache from cache file for Anonymous user(usefull for sessionless users) | |
| static | purgeUserCacheByUserId ($userId) |
| Delete User cache pr user. | |
| static | removeSessionData ($userID) |
| Remove session data for user $userID. | |
| static | removeUser ($userID) |
| static | requireUniqueEmail () |
| static | retrieveUserCacheFromFile ($filePath, $mtime, $userId) |
| Callback which fetches user cache from local file. | |
| static | setCurrentlyLoggedInUser ($user, $userID, $flags=0) |
| Makes sure the $user is set as the currently logged in user by updating the session and setting the necessary global variables. | |
| static | setFailedLoginAttempts ($userID, $value=false, $setByForce=false) |
| static | site () |
| static | updateLastVisit ($userID, $updateLoginCount=false) |
| static | validateLoginName ($loginName, &$errorText) |
| Validates user login name using site.ini[UserSettings]UserNameValidationRegex[]. | |
| static | validatePassword ($password) |
Public Attributes | |
| $Groups | |
| $Login | |
| $OriginalPassword | |
| $OriginalPasswordConfirm | |
| $PasswordHash | |
| $PasswordHashType | |
| const | AUTHENTICATE_ALL = 3 |
| const | AUTHENTICATE_EMAIL = 2 |
| Authenticate by matching the email field. | |
| const | AUTHENTICATE_LOGIN = 1 |
| Authenticate by matching the login field. | |
| const | NO_SESSION_REGENERATE = 1 |
| const | PASSWORD_HASH_CRYPT = 6 |
| const | PASSWORD_HASH_MD5_PASSWORD = 1 |
| MD5 of password. | |
| const | PASSWORD_HASH_MD5_SITE = 3 |
| MD5 of site, user and password. | |
| const | PASSWORD_HASH_MD5_USER = 2 |
| MD5 of user and password. | |
| const | PASSWORD_HASH_MYSQL = 4 |
| Legacy support for mysql hashed passwords. | |
| const | PASSWORD_HASH_PLAINTEXT = 5 |
| Passwords in plaintext, should not be used for real sites. | |
Protected Member Functions | |
| generateGroupIdList () | |
| Generate list of group id's. | |
Static Protected Member Functions | |
| static | _loginUser ($login, $password, $authenticationMatch=false) |
| Logs in an user if applied login and password is valid. | |
| static | getUserCacheByUserId ($userId) |
| Get User cache from cache file (usefull for sessionless users) | |
| static | loginFailed ($userID=false, $login) |
| Does some house keeping work when a log in has failed. | |
| static | loginSucceeded ($user) |
| Does some house keeping work once a log in has succeeded. | |
| static | userInfoExpiry () |
Protected Attributes | |
| $UserCache = null | |
Static Protected Attributes | |
| static | $anonymousId = null |
| static | $userHasLoggedOut = false |
eZUser handles eZ Publish user accounts
Definition at line 18 of file ezuser.php.
| static eZUser::_loginUser | ( | $ | login, |
| $ | password, | ||
| $ | authenticationMatch = false |
||
| ) | [static, protected] |
Logs in an user if applied login and password is valid.
This method does not do any house keeping work anymore (writing audits, etc). When you call this method make sure to call loginSucceeded() or loginFailed() depending on the success of the login.
| string | $login | |
| string | $password | |
| bool | $authenticationMatch |
Definition at line 753 of file ezuser.php.
Referenced by loginUser().
Returns either cached or newly generated accessArray for the user depending on site.ini\[RoleSettings] setting.
private
Definition at line 1780 of file ezuser.php.
Referenced by hasAccessTo().
Returns the eZUserAccountKey associated with this user.
Definition at line 2329 of file ezuser.php.
| static eZUser::anonymousId | ( | ) | [static] |
Gets the id of the anonymous user.
Definition at line 2745 of file ezuser.php.
Referenced by checkUser(), fetchAnonymousCount(), fetchBuiltin(), eZUserDiscountRule\fetchIDListByUserID(), fetchLoggedInCount(), fetchLoggedInList(), instance(), logoutCurrent(), and eZUserDiscountRule\store().
| static eZUser::authenticateHash | ( | $ | user, |
| $ | password, | ||
| $ | site, | ||
| $ | type, | ||
| $ | hash | ||
| ) | [static] |
Creates a hash out of $user, $password and $site according to the type $type.
Definition at line 1576 of file ezuser.php.
Referenced by _loginUser(), eZLDAPUser\loginUser(), and eZTextFileUser\loginUser().
| static eZUser::authenticationMatch | ( | ) | [static] |
Definition at line 647 of file ezuser.php.
Referenced by _loginUser(), eZLDAPUser\loginUser(), eZTextFileUser\loginUser(), and eZUserType\validateObjectAttributeHTTPInput().
| eZUser::canAssignSection | ( | $ | checkSectionID | ) |
Definition at line 1954 of file ezuser.php.
Definition at line 1985 of file ezuser.php.
| eZUser::canAssignSectionToClassList | ( | $ | checkSectionID | ) |
Definition at line 2019 of file ezuser.php.
| eZUser::canAssignSectionToObject | ( | $ | checkSectionID, |
| $ | contentObject | ||
| ) |
Definition at line 1881 of file ezuser.php.
| eZUser::canAssignToObjectSectionList | ( | $ | contentObject | ) |
Definition at line 1839 of file ezuser.php.
| eZUser::canLoginToSiteAccess | ( | $ | access | ) |
Definition at line 2775 of file ezuser.php.
| eZUser::checkUser | ( | &$ | siteBasics, |
| $ | uri | ||
| ) |
Checks if user is logged in, if not and the site requires user login for access a module redirect is returned.
Definition at line 2473 of file ezuser.php.
| static eZUser::cleanup | ( | ) | [static] |
Cleanup user related session values, for use by login / logout code.
Definition at line 1017 of file ezuser.php.
Referenced by logoutCurrent(), and setCurrentlyLoggedInUser().
| static eZUser::cleanupCache | ( | ) | [static] |
Expire user access / info cache globally.
Definition at line 2587 of file ezuser.php.
Referenced by eZRole\expireCache().
| static eZUser::clearSessionCache | ( | ) | [static] |
Removes any cached session information, this is:
Definition at line 518 of file ezuser.php.
Referenced by removeSessionData().
| static eZUser::contentClassIDs | ( | ) | [static] |
Returns the IDs of content classes that contain user accounts
Definition at line 2759 of file ezuser.php.
Referenced by eZContentOperationCollection\addAssignment(), eZApproveType\execute(), eZContentObjectTreeNodeOperations\move(), eZContentOperationCollection\removeAssignment(), eZContentOperationCollection\removeNodes(), eZContentObjectTreeNode\removeSubtrees(), eZContentObjectTreeNode\removeThis(), eZContentOperationCollection\setObjectStatusPublished(), and eZContentOperationCollection\swapNode().
Definition at line 2315 of file ezuser.php.
| static eZUser::create | ( | $ | contentObjectID | ) | [static] |
Definition at line 189 of file ezuser.php.
Referenced by eZTextFileUser\loginUser(), eZLDAPUser\publishNewUserGroup(), eZLDAPUser\publishUpdateUser(), and eZSiteInstaller\updateContentObjectAttributes().
| static eZUser::createHash | ( | $ | user, |
| $ | password, | ||
| $ | site, | ||
| $ | type, | ||
| $ | hash = false |
||
| ) | [static] |
Will create a hash of the given string. This is used to store the passwords in the database.
Definition at line 1676 of file ezuser.php.
Referenced by _loginUser(), authenticateHash(), eZLDAPUser\loginUser(), eZTextFileUser\loginUser(), and setInformation().
| static eZUser::createPassword | ( | $ | passwordLength, |
| $ | seed = false |
||
| ) | [static] |
Creates a password with number of characters equal to $passwordLength and returns it. If you want pass a value in $seed it will be used as basis for the password, if not it will use the current time value as seed.
Definition at line 1646 of file ezuser.php.
| static eZUser::currentUser | ( | ) | [static] |
Returns the currently logged in user.
Definition at line 1553 of file ezuser.php.
Referenced by eZDefaultShopAccountHandler\accountName(), eZCollaborationItemMessageLink\addMessage(), eZContentObject\allowedAssignSectionList(), eZContentObject\allowedAssignStateIDList(), eZSubTreeHandler\attribute(), eZGeneralDigestHandler\attribute(), eZSimplePrice\attribute(), eZWebDAVContentBackendAuth\authorize(), eZContentObject\cacheInfo(), eZContentObject\canCreateClassList(), eZContentObjectTreeNode\canCreateClassList(), eZContentObjectTreeNode\canEdit(), eZContentObject\canEdit(), eZContentClass\canInstantiateClasses(), eZContentClass\canInstantiateClassList(), eZOrder\canModifyStatus(), eZContentObject\canTranslate(), eZPackage\canUsePackagePolicyFunction(), eZPackage\canUsePolicyFunction(), eZContentObjectVersion\checkAccess(), eZContentObject\checkAccess(), eZContentObjectTreeNode\checkAccess(), eZSubtreeNotificationRule\checkObjectAccess(), eZPackageCreationHandler\checkPackageMaintainer(), checkTimeout(), checkUser(), eZUserType\classAttributeRemovableInformation(), eZContentObject\classListFromPolicy(), eZContentObjectTreeNode\classListFromPolicy(), eZContentObject\copy(), eZContentObject\copyVersion(), eZCollaborationSimpleMessage\create(), eZRSSImport\create(), eZInformationCollection\create(), eZContentObjectVersion\create(), eZBasket\createOrder(), eZContentObjectTreeNode\createPermissionCheckingSQL(), eZPackageCreationHandler\creatorList(), eZWishList\currentWishList(), eZWishList\discountPercent(), eZDefaultShopAccountHandler\email(), eZHTTPHeader\enabled(), eZApproveType\execute(), eZMultiplexerType\execute(), eZSimplePrice\eZSimplePrice(), eZWebDAVContentServer\eZWebDAVContentServer(), eZContentFunctionCollection\fetchBookmarks(), eZUserFunctionCollection\fetchCurrentUser(), eZSubTreeHandler\fetchHttpInput(), eZPackage\fetchMaintainerRoleIDList(), eZCollaborationFunctionCollection\fetchParticipant(), eZContentFunctionCollection\fetchRecent(), eZContentCacheManager\generateObjectViewCache(), eZInformationCollection\generateUserIdentifier(), eZContentObjectTreeNode\getLimitationList(), eZVATManager\getUserCountry(), eZApproveCollaborationHandler\handleCustomAction(), eZShopOperationCollection\handleUserCountry(), eZUserFunctionCollection\hasAccessTo(), eZContentClass\initializeCopy(), eZPackageCreationHandler\initializePackageChangelog(), eZPackageCreationHandler\initializePackageInformation(), eZPackageCreationHandler\initializePackageMaintainer(), eZCollaborationProfile\instance(), eZContentClass\instantiate(), ezpRestClient\isAuthorizedByUser(), isEnabled(), eZCollaborationGroup\itemCount(), eZLDAPUser\loginUser(), eZTopMenuOperator\modify(), eZAuthorType\objectAttributeContent(), eZSubtreeSubscriptionType\onPublish(), eZWebDAVContentServer\processClientRequest(), eZContentOperationCollection\publishNode(), eZContentObjectTreeNode\removeSubtrees(), eZCollaborationNotificationHandler\rules(), eZSubTreeHandler\rules(), eZSubTreeHandler\rulesCount(), eZTrigger\runTrigger(), sectionEditActionCheck(), eZGeneralDigestHandler\settings(), eZPreferences\setValue(), eZOrder\statusModificationList(), eZPDFExport\store(), eZRSSExport\store(), eZRSSImport\store(), eZGeneralDigestHandler\storeSettings(), eZContentClass\storeVersioned(), eZSubTreeHandler\subscribedNodes(), eZCollaborationGroup\subTree(), eZPreferences\value(), eZPreferences\values(), eZDefaultShopAccountHandler\verifyAccountInformation(), and eZAudit\writeAudit().
| static eZUser::currentUserID | ( | ) | [static] |
Returns the ID of the currently logged in user.
Definition at line 1563 of file ezuser.php.
Referenced by ezpContentAccessDeniedException\__construct(), eZDebug\checkDebugByUser(), eZContentObject\cleanupAllInternalDrafts(), eZContentObject\cleanupInternalDrafts(), eZCollaborationNotificationRule\create(), eZCollaborationItemStatus\create(), eZContentClassGroup\create(), eZOrderStatusHistory\create(), eZContentClass\create(), eZContentOperationCollection\createFeedForNode(), eZContentObjectTreeNode\dataMap(), eZCollaborationItemStatus\fetch(), eZCollaborationItemGroupLink\fetch(), eZContentFunctionCollection\fetchDraftVersionCount(), eZContentFunctionCollection\fetchDraftVersionList(), eZCollaborationNotificationRule\fetchList(), eZCollaborationItemGroupLink\fetchList(), eZCollaborationItem\fetchListTool(), eZContentFunctionCollection\fetchPendingCount(), eZContentFunctionCollection\fetchPendingList(), eZContentObjectPackageHandler\installContentObjects(), eZCollaborationItem\isCreator(), eZOrder\modifyStatus(), eZCollaborationNotificationRule\removeByIdentifier(), eZContentOperationCollection\removeTemporaryDrafts(), eZCollaborationItemParticipantLink\setLastRead(), eZCollaborationItem\setLastRead(), eZPreferences\setValue(), eZPackage\temporaryExportPath(), eZCollaborationItemStatus\updateFields(), and eZCollaborationItem\userStatus().
| static eZUser::definition | ( | ) | [static] |
Returns the definition for the object, the default implementation is to return an empty array.
It's upto each inheriting class to return a proper definition array.
The definition array is an associative array consists of these keys:
Example: public static function definition() { return array( "fields" => array( "id" => "ID", "version" => "Version", "name" => "Name" ), "keys" => array( "id", "version" ), "function_attributes" => array( "current" => "currentVersion", "class_name" => "className" ), "increment_key" => "id", "class_name" => "eZContentClass", "sort" => array( "id" => "asc" ), "name" => "ezcontentclass" ); }
Reimplemented from eZPersistentObject.
Definition at line 57 of file ezuser.php.
Referenced by fetch(), fetchByEmail(), fetchByName(), fetchUnactivated(), removeUser(), and ezpNativeUserAuthFilter\run().
| eZUser::eZUser | ( | $ | row = array() | ) |
Definition at line 50 of file ezuser.php.
Referenced by _loginUser(), create(), fetchLoggedInList(), instance(), eZLDAPUser\loginUser(), and eZTextFileUser\loginUser().
Returns the current user's number of failed login attempts.
Definition at line 1490 of file ezuser.php.
| static eZUser::failedLoginAttemptsByUserID | ( | $ | userID | ) | [static] |
Returns the current user's number of failed login attempts.
Definition at line 1498 of file ezuser.php.
Referenced by failedLoginAttempts().
| static eZUser::fetch | ( | $ | id, |
| $ | asObject = true |
||
| ) | [static] |
Definition at line 264 of file ezuser.php.
Referenced by _loginUser(), ezpRestClient\_owner(), eZUserOperationCollection\activation(), ezpRestOauthAuthenticationStyle\authenticate(), ezpRestNoAuthStyle\authenticate(), eZUserOperationCollection\checkActivation(), contentObject(), eZUserType\deleteStoredObjectAttribute(), eZOrder\discount(), ezpOauthUtility\doRefreshToken(), ezpOauthUtility\doRefreshTokenWithAuthorizationCode(), eZMultiplexerType\execute(), fetchBuiltin(), eZUserFunctionCollection\fetchMemberOf(), eZUserFunctionCollection\fetchUserRole(), eZUserOperationCollection\forgotpassword(), eZContentCacheManager\generateObjectViewCache(), generateUserCacheForFile(), eZLDAPUser\goAndPublishGroups(), eZUserFunctionCollection\hasAccessTo(), eZStepCreateSites\initializePackage(), instance(), isEnabled(), isEnabledAfterFailedLogin(), eZLDAPUser\loginUser(), eZTextFileUser\loginUser(), eZUserType\objectAttributeContent(), eZUserOperationCollection\password(), ezpContentPublishingProcess\publish(), eZLDAPUser\publishNewUserGroup(), eZLDAPUser\publishUpdateUser(), removeUser(), eZScriptTrashPurge\run(), eZUserOperationCollection\sendActivationEmail(), eZUserOperationCollection\sendUserNotification(), eZUserType\serializeContentObjectAttribute(), setFailedLoginAttempts(), eZPreferences\setValue(), eZUserType\toString(), eZUserType\unserializeContentObjectAttribute(), and eZCollaborationNotificationRule\user().
| static eZUser::fetchAnonymousCount | ( | ) | [static] |
Return the number of anonymous users in the system.
Definition at line 462 of file ezuser.php.
| static eZUser::fetchBuiltin | ( | $ | id | ) | [static] |
Fetches a builtin user and returns it, this helps avoid special cases where user is not logged in.
Definition at line 625 of file ezuser.php.
| static eZUser::fetchByEmail | ( | $ | email, |
| $ | asObject = true |
||
| ) | [static] |
Definition at line 282 of file ezuser.php.
Referenced by eZUserType\fromString(), and eZUserType\validateObjectAttributeHTTPInput().
| static eZUser::fetchByName | ( | $ | login, |
| $ | asObject = true |
||
| ) | [static] |
Definition at line 274 of file ezuser.php.
Referenced by ezpRestBasicAuthStyle\authenticate(), eZUserType\fromString(), eZTextFileUser\loginUser(), eZLDAPUser\publishUpdateUser(), and eZUserType\validateObjectAttributeHTTPInput().
| static eZUser::fetchContentList | ( | ) | [static] |
Definition at line 577 of file ezuser.php.
| static eZUser::fetchLoggedInCount | ( | ) | [static] |
Definition at line 436 of file ezuser.php.
| static eZUser::fetchLoggedInList | ( | $ | asObject = false, |
| $ | offset = false, |
||
| $ | limit = false, |
||
| $ | sortBy = false |
||
| ) | [static] |
| $asObject | If false it will return a list with only the names of the users as elements and user ID as key, otherwise each entry is a eZUser object. |
Definition at line 326 of file ezuser.php.
| static eZUser::fetchUnactivated | ( | $ | sort = false, |
| $ | limit = 10, |
||
| $ | offset = 0 |
||
| ) | [static] |
Return an array of unactivated eZUser object.
| array|false|null | An associative array of sorting conditions, if set to false ignores settings in $def, if set to null uses settingss in $def. | |
| int | $limit | |
| int | $offset |
Definition at line 300 of file ezuser.php.
| static eZUser::fetchUserClassList | ( | $ | asObject = false, |
| $ | fields = false |
||
| ) | [static] |
Definition at line 2621 of file ezuser.php.
Referenced by fetchUserClassNames(), and fetchUserGroupClassNames().
| static eZUser::fetchUserClassNames | ( | ) | [static] |
Definition at line 2653 of file ezuser.php.
Referenced by eZApproveType\customWorkflowEventHTTPAction().
| static eZUser::fetchUserGroupClassNames | ( | ) | [static] |
Definition at line 2664 of file ezuser.php.
Referenced by eZApproveType\customWorkflowEventHTTPAction(), and eZApproveType\validateGroupIDList().
Check if login handler require forced login at user check.
Definition at line 2561 of file ezuser.php.
Generates the accessArray for the user (for $this).
This function is uncached, and used as basis for user cache callback.
Definition at line 1805 of file ezuser.php.
Referenced by accessArray().
| eZUser::generateGroupIdList | ( | ) | [protected] |
Generate list of group id's.
Definition at line 2425 of file ezuser.php.
Referenced by generateAccessArray(), groups(), and limitList().
| static eZUser::generateUserCacheForFile | ( | $ | filePath, |
| $ | userId | ||
| ) | [static] |
Callback which generates user cache for user.
Definition at line 1317 of file ezuser.php.
| static eZUser::getCacheDir | ( | $ | userId = 0 | ) | [static] |
Creates the cache path if it doesn't exist, and returns the cache directory.
The $userId parameter is used to create multi-level directory names
int $userId
Definition at line 2573 of file ezuser.php.
Referenced by getCacheFilename(), getUserCacheByUserId(), and purgeUserCacheByUserId().
| static eZUser::getCacheFilename | ( | $ | userId | ) | [static] |
Returns the filename for a cache file with user information.
Definition at line 2602 of file ezuser.php.
Get User cache from cache file.
Definition at line 1212 of file ezuser.php.
Referenced by accessArray(), groups(), limitValueList(), and roleIDList().
| static eZUser::getUserCacheByAnonymousId | ( | ) | [static] |
Get User cache from cache file for Anonymous user(usefull for sessionless users)
Definition at line 1274 of file ezuser.php.
| static eZUser::getUserCacheByUserId | ( | $ | userId | ) | [static, protected] |
Get User cache from cache file (usefull for sessionless users)
| int | $userId |
Definition at line 1287 of file ezuser.php.
Referenced by getUserCacheByAnonymousId(), and instance().
| eZUser::groups | ( | $ | asObject = false | ) |
Definition at line 2351 of file ezuser.php.
Referenced by limitList().
| eZUser::hasAccessTo | ( | $ | module, |
| $ | function = false |
||
| ) |
Check if user has got access to the specified module and function
| module | name |
| funtion | name |
Definition at line 1732 of file ezuser.php.
Referenced by canAssignSection(), canAssignSectionList(), canAssignSectionToClassList(), canAssignSectionToObject(), canAssignToObjectSectionList(), canLoginToSiteAccess(), hasAccessToView(), and hasManageLocations().
| eZUser::hasAccessToView | ( | $ | module, |
| $ | viewName, | ||
| &$ | params | ||
| ) |
Definition at line 2070 of file ezuser.php.
| static eZUser::hashType | ( | ) | [static] |
Definition at line 595 of file ezuser.php.
Referenced by _loginUser(), eZLDAPUser\loginUser(), eZTextFileUser\loginUser(), and setInformation().
Check if current user has "content/manage_locations" access
Definition at line 178 of file ezuser.php.
Definition at line 232 of file ezuser.php.
| eZUser::id | ( | ) |
Definition at line 639 of file ezuser.php.
| static eZUser::instance | ( | $ | id = false | ) | [static] |
Returns a shared instance of the eZUser class pr $id value.
If user can not be fetched, then anonymous user is returned and a warning trown, if anonymous user can not be fetched, then NoUser is returned and another warning is thrown.
| int | false | $id | On false: Gets current user id from session or from eZUser::anonymousId() if not set. |
Definition at line 1079 of file ezuser.php.
Referenced by _loginUser(), anonymousId(), authenticationMatch(), checkUser(), cleanup(), cleanupCache(), contentClassIDs(), createHash(), currentUser(), currentUserID(), eZApproveType\execute(), failedLoginAttemptsByUserID(), fetchAnonymousCount(), fetchContentList(), fetchLoggedInCount(), fetchLoggedInList(), fetchUserClassList(), fetchUserGroupClassNames(), generateGroupIdList(), getCacheFilename(), eZLDAPUser\getGroupNameByDN(), eZLDAPUser\getNodeAssignmentsForGroupName(), getUserCacheByUserId(), groups(), hashType(), hasStoredLogin(), eZStepCreateSites\initializePackage(), isTrusted(), isUserLoggedIn(), lastVisit(), limitList(), loginCount(), loginFailed(), eZLDAPUser\loginUser(), eZTextFileUser\loginUser(), logoutCurrent(), maxNumberOfFailedLogin(), passwordCharacterTable(), eZLDAPUser\publishNewUserGroup(), eZLDAPUser\publishUpdateUser(), purgeUserCacheByUserId(), requireUniqueEmail(), setFailedLoginAttempts(), site(), updateLastVisit(), eZWorkflowProcess\user(), userInfoExpiry(), validateLoginName(), and validatePassword().
true if the user is the anonymous user. Definition at line 1540 of file ezuser.php.
true if the user is enabled and can be used on the site. Definition at line 1522 of file ezuser.php.
| static eZUser::isEnabledAfterFailedLogin | ( | $ | userID, |
| $ | ignoreTrusted = false |
||
| ) | [static] |
Definition at line 949 of file ezuser.php.
Referenced by _loginUser(), isLocked(), eZLDAPUser\loginUser(), and eZTextFileUser\loginUser().
| eZUser::isLocked | ( | ) |
true if the user is locked (is enabled after failed login) and can be logged on the site. Definition at line 1512 of file ezuser.php.
Returns true if it's a real user which is logged in. False if the user is the default user or the fallback buildtin user.
Definition at line 2338 of file ezuser.php.
| static eZUser::isTrusted | ( | ) | [static] |
Returns true if current user is trusted user.
Definition at line 915 of file ezuser.php.
Referenced by isEnabledAfterFailedLogin(), and setFailedLoginAttempts().
| static eZUser::isUserIPInList | ( | $ | ipList | ) | [static] |
Checks if IP address of current user is in $ipList.
Definition at line 872 of file ezuser.php.
Referenced by isTrusted().
| static eZUser::isUserLoggedIn | ( | $ | userID | ) | [static] |
Definition at line 491 of file ezuser.php.
Referenced by eZUserFunctionCollection\fetchIsLoggedIn().
| static eZUser::isUserObject | ( | $ | contentObject | ) | [static] |
Checks if the supplied content object is a user object ( contains ezuser datatype )
| ContentObject |
Definition at line 1618 of file ezuser.php.
Referenced by eZApproveType\fetchHTTPInput(), and eZApproveType\validateUserIDList().
Returns the last visit timestamp to the current user.
Definition at line 1391 of file ezuser.php.
| eZUser::limitList | ( | $ | useGroupsCache = true | ) |
Definition at line 2276 of file ezuser.php.
Referenced by limitValueList().
Definition at line 2297 of file ezuser.php.
Returns the login count for the current user.
Definition at line 1412 of file ezuser.php.
Definition at line 1032 of file ezuser.php.
| static eZUser::loginFailed | ( | $ | userID = false, |
| $ | login | ||
| ) | [static, protected] |
Does some house keeping work when a log in has failed.
| mixed | $userID | |
| string | $login |
Definition at line 727 of file ezuser.php.
Referenced by loginUser().
| static eZUser::loginSucceeded | ( | $ | user | ) | [static, protected] |
Does some house keeping work once a log in has succeeded.
| eZUser | $user |
Definition at line 707 of file ezuser.php.
Referenced by loginUser().
| eZUser::loginURI | ( | ) |
Check if login handler require special login URI
Definition at line 2551 of file ezuser.php.
| static eZUser::loginUser | ( | $ | login, |
| $ | password, | ||
| $ | authenticationMatch = false |
||
| ) | [static] |
Logs in the user if applied username and password is valid.
| string | $login | |
| string | $password | |
| bool | $authenticationMatch |
Reimplemented in eZTextFileUser, and eZLDAPUser.
Definition at line 686 of file ezuser.php.
Referenced by eZScript\initialize().
| static eZUser::logoutCurrent | ( | ) | [static] |
Logs out the current user
Definition at line 1041 of file ezuser.php.
Referenced by checkUser(), and eZScript\shutdown().
| static eZUser::maxNumberOfFailedLogin | ( | ) | [static] |
Returns max number of failed login attempts.
Definition at line 934 of file ezuser.php.
Referenced by isEnabledAfterFailedLogin(), and setFailedLoginAttempts().
Definition at line 212 of file ezuser.php.
Definition at line 222 of file ezuser.php.
| static eZUser::passwordCharacterTable | ( | ) | [static] |
Definition at line 1585 of file ezuser.php.
Referenced by createPassword().
| static eZUser::passwordHashTypeID | ( | $ | identifier | ) | [static] |
Definition at line 143 of file ezuser.php.
Referenced by eZUserType\fromString(), and eZUserType\unserializeContentObjectAttribute().
| static eZUser::passwordHashTypeName | ( | $ | id | ) | [static] |
Definition at line 109 of file ezuser.php.
Referenced by eZUserType\serializeContentObjectAttribute(), and eZUserType\toString().
Function performed after user login info has been collected. Store login data as array: array( 'login' => <username>, 'password' = <password> ) to session variable EZ_LOGIN_HANDLER_USER_INFO for automatic processing of login data.
Definition at line 2541 of file ezuser.php.
Funtion performed before user login info is collected. It's optional to implement this function in new login handler.
Definition at line 2527 of file ezuser.php.
Delete User cache from locale var and cache file for current user.
Definition at line 1226 of file ezuser.php.
| static eZUser::purgeUserCacheByAnonymousId | ( | ) | [static] |
Delete User cache from cache file for Anonymous user(usefull for sessionless users)
Definition at line 1250 of file ezuser.php.
Referenced by eZUserDiscountRule\store().
| static eZUser::purgeUserCacheByUserId | ( | $ | userId | ) | [static] |
Delete User cache pr user.
| int | $userId |
Definition at line 1261 of file ezuser.php.
Referenced by eZContentOperationCollection\addAssignment(), eZContentObjectTreeNodeOperations\move(), purgeUserCache(), purgeUserCacheByAnonymousId(), eZContentOperationCollection\removeAssignment(), eZContentOperationCollection\removeNodes(), eZContentObjectTreeNode\removeThis(), eZContentOperationCollection\setObjectStatusPublished(), store(), and eZContentOperationCollection\swapNode().
| static eZUser::removeSessionData | ( | $ | userID | ) | [static] |
Remove session data for user $userID.
int $userID
Definition at line 532 of file ezuser.php.
Referenced by eZUserOperationCollection\activation(), eZContentObjectTreeNode\removeThis(), removeUser(), eZUserSetting\setAttribute(), and eZUserOperationCollection\setSettings().
| static eZUser::removeUser | ( | $ | userID | ) | [static] |
Removes the user from the ezuser table.
Definition at line 542 of file ezuser.php.
Referenced by eZUserType\deleteStoredObjectAttribute().
| static eZUser::requireUniqueEmail | ( | ) | [static] |
true if there can only be one instance of an email address on the site. Definition at line 672 of file ezuser.php.
Referenced by eZUserType\fromString(), and eZUserType\validateObjectAttributeHTTPInput().
| static eZUser::retrieveUserCacheFromFile | ( | $ | filePath, |
| $ | mtime, | ||
| $ | userId | ||
| ) | [static] |
Callback which fetches user cache from local file.
Definition at line 1305 of file ezuser.php.
Definition at line 2260 of file ezuser.php.
| eZUser::roles | ( | ) |
Definition at line 2250 of file ezuser.php.
Used by login handler to clean up session variables
Definition at line 1008 of file ezuser.php.
Referenced by cleanup().
| static eZUser::setCurrentlyLoggedInUser | ( | $ | user, |
| $ | userID, | ||
| $ | flags = 0 |
||
| ) | [static] |
Makes sure the $user is set as the currently logged in user by updating the session and setting the necessary global variables.
All login handlers should use this function to ensure that the process is executed properly.
private
| eZUser | $user | User |
| int | $userID | User ID |
| int | $flags | Optional flag that can be set to: eZUser::NO_SESSION_REGENERATE to avoid session to be regenerated |
Definition at line 989 of file ezuser.php.
Referenced by ezpRestAuthConfiguration\filter(), eZContentCacheManager\generateObjectViewCache(), instance(), loginCurrent(), loginSucceeded(), eZLDAPUser\loginUser(), eZTextFileUser\loginUser(), ezpContentPublishingProcess\publish(), and eZScriptTrashPurge\run().
| static eZUser::setFailedLoginAttempts | ( | $ | userID, |
| $ | value = false, |
||
| $ | setByForce = false |
||
| ) | [static] |
If $value is false will increase the user's number of failed login attempts otherwise failed_login_attempts will be updated by $value. $setByForce if true checking for trusting or max number of failed login attempts will be ignored.
Definition at line 1431 of file ezuser.php.
Referenced by loginFailed(), loginSucceeded(), eZLDAPUser\loginUser(), eZTextFileUser\loginUser(), and eZLDAPUser\publishUpdateUser().
| eZUser::setInformation | ( | $ | id, |
| $ | login, | ||
| $ | email, | ||
| $ | password, | ||
| $ | passwordConfirm = false |
||
| ) |
Fills in the $id, $login, $email and $password for the user and creates the proper password hash.
Definition at line 245 of file ezuser.php.
| eZUser::setOriginalPassword | ( | $ | password | ) |
Definition at line 217 of file ezuser.php.
Referenced by setInformation().
| eZUser::setOriginalPasswordConfirm | ( | $ | password | ) |
Definition at line 227 of file ezuser.php.
Referenced by setInformation().
| eZUser::setUserCache | ( | array $ | userCache | ) |
Set User cache from cache file Needs to be in excact same format as eZUser::getUserCache()!
| array | $userCache |
Definition at line 1239 of file ezuser.php.
Referenced by getUserCache().
| static eZUser::site | ( | ) | [static] |
Definition at line 615 of file ezuser.php.
Referenced by _loginUser(), eZLDAPUser\loginUser(), eZTextFileUser\loginUser(), and setInformation().
| eZUser::store | ( | $ | fieldFilters = null | ) |
Stores the object in the database, uses storeObject() to do the actual job and passes $fieldFilters to it.
Note: Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.
| array | null | $fieldFilters |
Reimplemented from eZPersistentObject.
Definition at line 201 of file ezuser.php.
| static eZUser::updateLastVisit | ( | $ | userID, |
| $ | updateLoginCount = false |
||
| ) | [static] |
Updates the user's last visit timestamp Optionally updates user login count by setting $updateLoginCount to true
Definition at line 1366 of file ezuser.php.
Referenced by instance(), loginSucceeded(), eZLDAPUser\loginUser(), eZTextFileUser\loginUser(), and eZLDAPUser\publishUpdateUser().
| static eZUser::userInfoExpiry | ( | ) | [static, protected] |
Callback which figures out global expiry and returns it.
Definition at line 1818 of file ezuser.php.
| static eZUser::validateLoginName | ( | $ | loginName, |
| &$ | errorText | ||
| ) | [static] |
Validates user login name using site.ini[UserSettings]UserNameValidationRegex[].
| string | $loginName | that we want to validate. |
| string | $errorText | by reference for details if validation fails. |
Definition at line 2720 of file ezuser.php.
Referenced by eZUserType\validateObjectAttributeHTTPInput().
| static eZUser::validatePassword | ( | $ | password | ) | [static] |
Checks the password for validity
Definition at line 2697 of file ezuser.php.
Referenced by eZStepSiteAdmin\processPostData(), setInformation(), and eZUserType\validateObjectAttributeHTTPInput().
eZUser::$anonymousId = null [static, protected] |
Definition at line 48 of file ezuser.php.
Referenced by anonymousId().
| eZUser::$Email |
Definition at line 2812 of file ezuser.php.
| eZUser::$Groups |
Definition at line 2815 of file ezuser.php.
| eZUser::$Login |
Definition at line 2811 of file ezuser.php.
| eZUser::$OriginalPassword |
Definition at line 2816 of file ezuser.php.
| eZUser::$OriginalPasswordConfirm |
Definition at line 2817 of file ezuser.php.
| eZUser::$PasswordHash |
Definition at line 2813 of file ezuser.php.
| eZUser::$PasswordHashType |
Definition at line 2814 of file ezuser.php.
eZUser::$UserCache = null [protected] |
Definition at line 2826 of file ezuser.php.
eZUser::$userHasLoggedOut = false [static, protected] |
Definition at line 2834 of file ezuser.php.
| const eZUser::AUTHENTICATE_ALL = 3 |
Definition at line 38 of file ezuser.php.
| const eZUser::AUTHENTICATE_EMAIL = 2 |
Authenticate by matching the email field.
Definition at line 36 of file ezuser.php.
Referenced by authenticationMatch(), eZLDAPUser\loginUser(), eZTextFileUser\loginUser(), and eZUserType\validateObjectAttributeHTTPInput().
| const eZUser::AUTHENTICATE_LOGIN = 1 |
Authenticate by matching the login field.
Definition at line 34 of file ezuser.php.
Referenced by authenticationMatch(), eZLDAPUser\loginUser(), and eZTextFileUser\loginUser().
| const eZUser::NO_SESSION_REGENERATE = 1 |
Definition at line 46 of file ezuser.php.
Referenced by eZContentCacheManager\generateObjectViewCache().
| const eZUser::PASSWORD_HASH_CRYPT = 6 |
Definition at line 31 of file ezuser.php.
Referenced by hashType(), and passwordHashTypeID().
| const eZUser::PASSWORD_HASH_MD5_PASSWORD = 1 |
MD5 of password.
Definition at line 21 of file ezuser.php.
Referenced by hashType(), and passwordHashTypeID().
| const eZUser::PASSWORD_HASH_MD5_SITE = 3 |
MD5 of site, user and password.
Definition at line 25 of file ezuser.php.
Referenced by hashType(), and passwordHashTypeID().
| const eZUser::PASSWORD_HASH_MD5_USER = 2 |
MD5 of user and password.
Definition at line 23 of file ezuser.php.
Referenced by hashType(), and passwordHashTypeID().
| const eZUser::PASSWORD_HASH_MYSQL = 4 |
Legacy support for mysql hashed passwords.
Definition at line 27 of file ezuser.php.
Referenced by eZLDAPUser\loginUser(), eZTextFileUser\loginUser(), and passwordHashTypeID().
| const eZUser::PASSWORD_HASH_PLAINTEXT = 5 |
Passwords in plaintext, should not be used for real sites.
Definition at line 29 of file ezuser.php.
Referenced by hashType(), and passwordHashTypeID().