eZUser handles Exponential user accounts
More...
Inheritance diagram for eZUser:
List of all members.
|
Public Methods |
& | definition () |
| attribute ($name) |
| setInformation ($id,$login,$email,$password,$passwordConfirm=false) |
& | fetchBuiltin ($id) |
| id () |
| authenticationMatch () |
| loginCurrent () |
| logoutCurrent () |
& | instance ($id=false) |
& | roles () |
& | roleIDList () |
& | isLoggedIn () |
& | groups ($asObject=false,$userID=false) |
Static Public Methods |
| hashType () |
| site () |
& | loginUser ($login,$password,$authenticationMatch=false) |
& | currentUser () |
& | currentUserID () |
| authenticateHash ($user,$password,$site,$type,$hash) |
| passwordCharacterTable () |
| createPassword ($passwordLength,$seed=false) |
| createHash ($user,$password,$site,$type) |
Public Attributes |
| Login |
| \privatesection
|
Detailed Description
eZUser handles Exponential user accounts
Definition at line ezuser.php.
Member Function Documentation
eZUser::attribute |
( |
$ |
name |
) |
|
|
|
- Returns:
-
the attribute data for $attr, this is either returned from the member variables or a member function depending on whether the definition field or function attributes matched.
Reimplemented from eZPersistentObject.
Definition at line ezuser.php.
References roles().
Referenced by roles(). |
eZUser::authenticateHash |
( |
$ |
user, |
|
|
$ |
password, |
|
|
$ |
site, |
|
|
$ |
type, |
|
|
$ |
hash |
|
) |
[static] |
|
|
Creates a hash out of $user, $password and $site according to the type $type. - Returns:
-
true if the generated hash is equal to the supplied hash $hash.
Definition at line ezuser.php.
References site().
Referenced by loginUser(). |
eZUser::authenticationMatch |
( |
|
) |
|
|
eZUser::createHash |
( |
$ |
user, |
|
|
$ |
password, |
|
|
$ |
site, |
|
|
$ |
type |
|
) |
[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. - Note:
-
If $passwordLength exceeds 16 it will need to generate new seed for the remaining characters.
Definition at line ezuser.php.
References passwordCharacterTable(). |
& eZUser::currentUser |
( |
|
) |
[static] |
|
& eZUser::currentUserID |
( |
|
) |
[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:
- fields - an associative array of fields which defines which database field (the key) is to fetched and how they map to object member variables (the value).
- keys - an array of fields which is used for uniquely identifying the object in the table.
- function_attributes - an associative array of attributes which maps to member functions, used for fetching data with functions.
- set_functions - an associative array of attributes which maps to member functions, used for setting data with functions.
- increment_key - the field which is incremented on table inserts.
- class_name - the classname which is used for instantiating new objecs when fetching from the database.
- sort - an associative array which defines the default sorting of lists, the key is the table field while the value is the sorting method which is either
asc or desc . - name - the name of the database table
Example: 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 ezuser.php.
References roles(). |
& eZUser::fetchBuiltin |
( |
$ |
id |
) |
|
|
|
Fetches a builtin user and returns it, this helps avoid special cases where user is not logged in.
Definition at line ezuser.php.
References id(). |
& eZUser::groups |
( |
$ |
asObject = false, |
|
|
$ |
userID = false |
|
) |
|
|
eZUser::hashType |
( |
|
) |
[static] |
|
& eZUser::instance |
( |
$ |
id = false |
) |
|
|
|
Finds the user with the id $id and returns the unique instance of it. If the user instance is not created yet it tries to either fetch it from the database with eZUser::fetch(). If $id is false or the user was not found, the default user is returned. This is a site.ini setting under UserSettings:AnonymousUserID. The instance is then returned. If $id is false then the current user is fetched.
Definition at line ezuser.php.
References eZDebug::writeWarning().
Referenced by currentUserID(). |
|
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 ezuser.php.
Referenced by definition(). |
|
- Returns:
-
logs in the current user object
Definition at line ezuser.php. |
& eZUser::loginUser |
( |
$ |
login, |
|
|
$ |
password, |
|
|
$ |
authenticationMatch = false |
|
) |
[static] |
|
eZUser::logoutCurrent |
( |
|
) |
|
|
eZUser::passwordCharacterTable |
( |
|
) |
[static] |
|
|
- Returns:
-
an array of role ids which the user is assigned to
Definition at line ezuser.php.
References groups(). |
|
- Returns:
-
an array of roles which the user is assigned to
Definition at line ezuser.php.
References roles().
Referenced by roles(). |
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 ezuser.php.
References site(). |
eZUser::site |
( |
|
) |
[static] |
|
The documentation for this class was generated from the following file:
|