Class: LiveUser
Source Location: /LiveUser-0.16.5/LiveUser.php
This is a manager class for a user login system using the LiveUser class. It creates a LiveUser object, takes care of the whole login process and stores the LiveUser object in a session.
Author(s):
Version:
- Release: @package_version@
Copyright:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
LiveUser (Constructor) [line 337]
addErrorLog [line 791]
boolean addErrorLog(
Log
&$log)
|
|
Adds an error logger to Errorstack. Be aware that if you need add a log at the beginning of your code if you want it to be effective. A log will only be taken into account after it's added. Sample usage:
$logger = &Log::factory('mail', 'bug@example.com',
'myapp_debug_mail_log', array('from' => 'application_bug@example.com'));
Parameters:
arrayMergeClobber [line 663]
array|false arrayMergeClobber(
array
$a1, array
$a2)
|
|
Clobbers two arrays together. Function taken from the user notes of array_merge_recursive used in LiveUser::readConfig() may be called statically
Parameters:
authFactory [line 571]
object|false &authFactory(
array|file
&$conf, string
$containerName, [string
$classprefix = 'LiveUser_'])
|
|
Creates an instance of an auth object.
Parameters:
checkGroup [line 1487]
boolean checkGroup(
array|int
$groups)
|
|
Wrapper method for the permission object's own checkGroup method.
Parameters:
checkRight [line 1431]
int|false checkRight(
array|int
$rights)
|
|
Wrapper method for the permission object's own checkRight method.
Parameters:
checkRightLevel [line 1469]
boolean checkRightLevel(
array|int
$rights, array|int
$owner_user_id, array|int
$owner_group_id)
|
|
Wrapper method for the permission object's own checkRightLevel method.
Parameters:
cryptRC4Factory [line 807]
object returns &cryptRC4Factory(
string
$secret)
|
|
Creates an instance of the PEAR::Crypt_Rc4 class.
Parameters:
disconnect [line 1178]
Properly disconnect resources in the active container
factory [line 458]
LiveUser|false &factory(
mixed
$conf, [string
$handle = ''], [string
$passwd = ''], [boolean
$logout = false], [boolean
$remember = false], [mixed
$confName = 'liveuserConfig'])
|
|
Returns an instance of the login manager class. This array contains private options defined by the following associative keys: array(
'autoInit' => false/true,
'session' => array(
'name' => 'liveuser session name',
'varname' => 'liveuser session var name'
),
// The session_save_handler options are optional. If they are specified,
// session_set_save_handler() will be called with the parameters
'session_save_handler' => array(
'open' => 'name of the open function/method',
'close' => 'name of the close function/method',
'read' => 'name of the read function/method',
'write' => 'name of the write function/method',
'destroy' => 'name of the destroy function/method',
'gc' => 'name of the gc function/method',
),
// The session_cookie_params options are optional. If they are specified,
// session_set_cookie_params() will be called with the parameters
'session_cookie_params' => array(
'lifetime' => 'Cookie lifetime in days',
'path' => 'Cookie path',
'domain' => 'Cookie domain',
'secure' => 'Cookie send only over secure connections',
),
'cache_perm' => if the permission data should be cached inside the session
'login' => array(
'force' => 'Should the user be forced to login'
'regenid' => 'Should the session be regenerated on login'
),
'logout' => array(
'destroy' => 'Whether to destroy the session on logout' false or true
),
// The cookie options are optional. If they are specified, the Remember Me
// feature is activated.
'cookie' => array(
'name' => 'Name of Remember Me cookie',
'lifetime' => 'Cookie lifetime in days',
'path' => 'Cookie path',
'domain' => 'Cookie domain',
'secret' => 'Secret key used for cookie value encryption',
'savedir' => '/absolute/path/to/writeable/directory' // No / at the end !
'secure' => 'Cookie send only over secure connections',
),
'authContainers' => array(
'name' => array(
'type' => 'DB',
'loginTimeout' => 0,
'expireTime' => 3600,
'idleTime' => 1800,
'updateLastLogin' => true,
'allowDuplicateHandles' => false,
'allowEmptyPasswords' => false,
'storage' => array(
'connection' => 'db connection object, use this or dsn',
'dsn' => 'database dsn, use this or connection',
),
'externalValues' => array(
'values' => &$_SERVER,
'keysToCheck' => array('HTTP_USER_AGENT')
),
),
),
'permContainer' => array(
'type' => 'Complex',
'storage' => array(
'MDB2' => array(
'dsn' => $dsn,
'prefix' => 'liveuser_'
'tables' => array(),
'fields' => array(),
'alias' => array(),
'force_seq' => true,
),
),
),
Other options in the configuration file relative to the Auth and Perm containers depend on what the containers expect. Refer to the Containers documentation. The examples for containers provided are just general do not reflect all the options for all containers.
Parameters:
fileExists [line 686]
boolean fileExists(
string
$file)
|
|
Checks if a file exists in the include path.
Parameters:
freeze [line 1151]
Stores all properties in the session.
getErrors [line 529]
Wrapper method to get the Error Stack
getOption [line 888]
mixed getOption(
string
$option)
|
|
Returns the value of an option
Parameters:
getProperty [line 1554]
mixed getProperty(
string
$what, [string
$container = 'auth'])
|
|
Wrapper method to access properties from the auth and permission containers.
Parameters:
getStatus [line 1612]
init [line 945]
boolean init(
[string
$handle = ''], [string
$passwd = ''], [boolean
$logout = false], [boolean
$remember = false])
|
|
Tries to retrieve auth object from session. If this fails, the method attempts a login based on the parameters or cookie data
Parameters:
isInactive [line 1539]
Function that determines if the user exists but hasn't yet been declared "active" by an administrator. Use this to check if this was the reason why a user was not able to login. true == user account is NOT active false == user account is active
isLoggedIn [line 1516]
Checks if a user is logged in.
loadClass [line 545]
boolean loadClass(
string
$classname)
|
|
Loads a PEAR class
Parameters:
loadPEARLog [line 763]
This method lazy loads PEAR::Log.
permFactory [line 594]
object|false &permFactory(
array|file
&$conf, [string
$classprefix = 'LiveUser_'])
|
|
Creates an instance of an perm object.
Parameters:
readConfig [line 706]
boolean readConfig(
array|file
$conf, string
$confName)
|
|
Reads the configuration.
Parameters:
setOption [line 869]
boolean setOption(
string
$option, mixed
$value)
|
|
Sets an option.
Parameters:
singleton [line 495]
LiveUser|false &singleton(
[array|file
$conf = array()], [string
$handle = ''], [string
$passwd = ''], [boolean
$logout = false], [boolean
$remember = false], [string
$confName = 'liveuserConfig'])
|
|
This uses the singleton pattern, making sure you have one and only instance of the class. In PHP4 you MUST call this method with the
$var = &LiveUser::singleton() syntax.
Without the ampersand (&) in front of the method name, you will not get
a reference, you will get a copy.
Parameters:
statusMessage [line 1637]
string statusMessage(
int
$value)
|
|
Return a textual status message for a LiveUser status code.
Parameters:
storageFactory [line 617]
object|false &storageFactory(
array
&$confArray, [string
$classprefix = 'LiveUser_Perm_'])
|
|
Returns an instance of a storage Container.
Parameters:
updateProperty [line 1578]
boolean updateProperty(
boolean
$auth, [boolean
$perm = null])
|
|
updates the properties of the containers from the original source
Parameters:
__toString [line 1624]
Make a string representation of the object.
Documentation generated on Mon, 11 Mar 2019 14:16:42 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|