Class: LiveUser
Source Location: /LiveUser-0.16.7/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 330]
void LiveUser(
&$debug, bool|object
$debug)
|
|
Constructor
Parameters:
arrayMergeClobber [line 636]
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 544]
object|false &authFactory(
array|file
&$conf, string
$containerName, [string
$classprefix = 'LiveUser_'])
|
|
Creates an instance of an auth object.
Parameters:
checkGroup [line 1443]
boolean checkGroup(
array|int
$groups)
|
|
Wrapper method for the permission object's own checkGroup method.
Parameters:
checkRight [line 1385]
int|false checkRight(
array|int
$rights)
|
|
Wrapper method for the permission object's own checkRight method.
Parameters:
checkRightLevel [line 1425]
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 758]
object returns &cryptRC4Factory(
string
$secret)
|
|
Creates an instance of the PEAR::Crypt_Rc4 class.
Parameters:
disconnect [line 1129]
Properly disconnect resources in the active container
factory [line 442]
LiveUser|false &factory(
&$conf, array
$conf)
|
|
Returns an instance of the login manager class. This array contains private options defined by the following associative keys: array(
'debug' => false/true or an instance of a class that implements the PEAR:Log interface
'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,
'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 659]
boolean fileExists(
string
$file)
|
|
Checks if a file exists in the include path.
Parameters:
getErrors [line 502]
Wrapper method to get the Error Stack
getOption [line 839]
mixed getOption(
string
$option)
|
|
Returns the value of an option
Parameters:
getProperty [line 1510]
mixed getProperty(
string
$what, [string
$container = 'auth'])
|
|
Wrapper method to access properties from the auth and permission containers.
Parameters:
getStatus [line 1568]
init [line 896]
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 1495]
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 1472]
Checks if a user is logged in.
loadClass [line 518]
boolean loadClass(
string
$classname)
|
|
Loads a PEAR class
Parameters:
login [line 963]
boolean login(
[string
$handle = ''], [string
$passwd = ''], [boolean
$remember = false])
|
|
Tries to log the user in by trying all the Auth containers defined in the configuration file until there is a success or failure.
Parameters:
logout [line 1345]
void logout(
[boolean
$direct = true])
|
|
This destroys the session object.
Parameters:
PEARLogFactory [line 726]
void &PEARLogFactory(
&$log, bool|object
$log)
|
|
This method lazy loads PEAR::Log.
Parameters:
permFactory [line 567]
object|false &permFactory(
array|file
&$conf, [string
$classprefix = 'LiveUser_'])
|
|
Creates an instance of an perm object.
Parameters:
readConfig [line 679]
boolean readConfig(
array|file
&$conf, string
1)
|
|
Reads the configuration.
Parameters:
setOption [line 820]
boolean setOption(
string
$option, mixed
$value)
|
|
Sets an option.
Parameters:
singleton [line 475]
LiveUser|false &singleton(
&$conf, [array
$signature = null], array
$conf)
|
|
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 1593]
string statusMessage(
int
$value)
|
|
Return a textual status message for a LiveUser status code.
Parameters:
storageFactory [line 590]
object|false &storageFactory(
array
&$confArray, [string
$classprefix = 'LiveUser_Perm_'])
|
|
Returns an instance of a storage Container.
Parameters:
updateProperty [line 1534]
boolean updateProperty(
boolean
$auth, [boolean
$perm = null])
|
|
updates the properties of the containers from the original source
Parameters:
Documentation generated on Mon, 11 Mar 2019 14:13:05 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|