Class: LiveUser
Source Location: /LiveUser-0.15.1/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 327]
addErrorLog [line 775]
boolean addErrorLog(
Log
&$log)
|
|
Add error logger for use by 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 644]
array|false arrayMergeClobber(
array
$a1, array
$a2)
|
|
Clobbers two arrays together taken from the user notes of array_merge_recursive used in LiveUser::_readConfig() may be called statically
Parameters:
authFactory [line 566]
object|false &authFactory(
array|file
&$conf, string
$containerName, [string
$classprefix = 'LiveUser_'])
|
|
Creates an instance of an auth object
Parameters:
checkGroup [line 1448]
boolean checkGroup(
array|int
$groups)
|
|
Wrapper method for the permission object's own checkGroup method.
Parameters:
checkRight [line 1392]
int|false checkRight(
array|int
$rights)
|
|
Wrapper method for the permission object's own checkRight method.
Parameters:
checkRightLevel [line 1430]
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 791]
object Returns &cryptRC4Factory(
string
$secret)
|
|
Creates an instance of the PEAR::Crypt_Rc4 class
Parameters:
disconnect [line 1131]
Properly disconnect resources in the active container
factory [line 462]
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',
),
'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',
'connection' => 'db connection object, use this or dsn',
'dsn' => 'database dsn, use this or connection',
'loginTimeout' => 0,
'expireTime' => 3600,
'idleTime' => 1800,
'updateLastLogin' => true,
'allowDuplicateHandles' => false,
'allowEmptyPasswords' => false,
'authTable' => 'liveuser_users',
'authTableCols' => array(
'required' => array(
'auth_user_id' => array('type' => 'text', 'name' => 'user_id'),
'handle' => array('type' => 'text', 'name' => 'handle'),
'passwd' => array('type' => 'text', 'name' => 'passwd')
),
'optional' => array(
'owner_user_id' => array('type' => 'integer', 'name' => 'owner_user_id'),
'owner_group_id' => array('type' => 'integer', 'name' => 'owner_group_id')
'lastlogin' => array('type' => 'timestamp', 'name' => 'lastlogin'),
'is_active' => array('type' => 'boolean', 'name' => 'is_active')
),
'custom' => array(
'myaliasforfield1' => array('type' => 'text', 'name' => 'myfield1')
)
),
'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 670]
boolean fileExists(
string
$file)
|
|
checks if a file exists in the include path
Parameters:
freeze [line 1104]
Store all properties in an array
getErrors [line 524]
Wrapper method to get the Error Stack
getOption [line 872]
mixed getOption(
string
$option)
|
|
Returns the value of an option
Parameters:
getProperty [line 1515]
mixed getProperty(
string
$what, [string
$container = 'auth'])
|
|
Wrapper method to access properties from the auth and permission containers.
Parameters:
getStatus [line 1537]
init [line 898]
boolean init(
[string
$handle = ''], [string
$passwd = ''], [boolean
$logout = false], [boolean
$remember = false])
|
|
Tries to retrieve auth object from session. If this fails, the class attempts a login based on cookie or form information (depends on class settings). Returns true if a auth object was successfully retrieved or created. Otherwise, false is returned.
Parameters:
isInactive [line 1500]
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 1477]
Checks if a user is logged in.
loadClass [line 540]
boolean loadClass(
string
$classname)
|
|
Loads a PEAR class
Parameters:
loadPEARLog [line 747]
This method lazy loads PEAR::Log
logout [line 1333]
void logout(
[boolean
$direct = true])
|
|
This destroys the session object.
Parameters:
permFactory [line 589]
object|false &permFactory(
array|file
&$conf, [string
$classprefix = 'LiveUser_'])
|
|
Creates an instance of an perm object
Parameters:
setOption [line 853]
boolean setOption(
string
$option, mixed
$value)
|
|
Sets an option.
Parameters:
singleton [line 498]
LiveUser|false &singleton(
array|file
$conf, [string
$handle = ''], [string
$passwd = ''], [boolean
$logout = false], [boolean
$remember = false], [string
$confName = 'liveuserConfig'])
|
|
Makes your instance global. 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 1562]
string statusMessage(
int
$value)
|
|
Return a textual status message for a LiveUser status code.
Parameters:
storageFactory [line 612]
object|false &storageFactory(
array
&$confArray, [string
$classprefix = 'LiveUser_'])
|
|
Returns an instance of a storage Container
Parameters:
__toString [line 1549]
make a string representation of the object
Documentation generated on Mon, 11 Mar 2019 14:31:02 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|