Source for file conf.php
Documentation is available at conf.php
define('EMAIL_WEBMASTER', 'krausbn@php.net');
//$path_to_liveuser_dir = 'path/to/pear/'.PATH_SEPARATOR;
//ini_set('include_path', $path_to_liveuser_dir . ini_get('include_path'));
include_once 'HTML/Template/IT.php';
$tpl = new HTML_Template_IT ();
$tpl->loadTemplatefile ('error-page.tpl.php');
$tpl->setVariable ('error_msg', " <b>$errfile ($errline)</b><br />$errstr" );
$error_string = $err_obj->getMessage () . '<br />' . $err_obj->getUserInfo ();
PEAR ::setErrorHandling (PEAR_ERROR_CALLBACK , 'pear_error_handler');
// Data Source Name (DSN)
//$dsn = '{dbtype}://{user}:{passwd}@{dbhost}/{dbname}';
$dsn = 'mysql://root:@localhost/liveuser_test_example4';
$db = & DB ::connect ($dsn, true );
$db->setFetchMode (DB_FETCHMODE_ASSOC );
$tpl = new HTML_Template_IT ();
'authContainers' => array (
'allowDuplicateHandles' => 0 ,
'authTable' => 'liveuser_users',
'authTableCols' => array (
'auth_user_id' => array ('name' => 'authUserId', 'type' => 'text'),
'handle' => array ('name' => 'handle', 'type' => 'text'),
'passwd' => array ('name' => 'passwd', 'type' => 'text'),
'lastlogin' => array ('name' => 'lastLogin', 'type' => 'timestamp'),
'is_active' => array ('name' => 'isActive', 'type' => 'boolean')
'file' => 'Auth_XML.xml',
'allowDuplicateHandles' => false ,
'passwordEncryptionMode' => 'MD5'
'permContainer' => array (
'storage' => array ('DB' => array ('dsn' => $dsn, 'prefix' => 'liveuser_')),
require_once 'LiveUser.php';
$tpl = new HTML_Template_IT ();
$tpl->loadTemplatefile ('loginform.tpl.php');
$tpl->setVariable ('form_action', $_SERVER['PHP_SELF']);
$liveUserObj = & $notification->getNotificationObject ();
if ($liveUserObj->getStatus ()) {
switch ($liveUserObj->getStatus ()) {
$tpl->touchBlock ('inactive');
$tpl->touchBlock ('idled');
$tpl->touchBlock ('expired');
$tpl->touchBlock ('failure');
// Create new LiveUser (LiveUser) object.
$LU->dispatcher ->addObserver ('showLoginForm', 'forceLogin');
$username = (isset ($_REQUEST['username'])) ? $_REQUEST['username'] : null;
$password = (isset ($_REQUEST['password'])) ? $_REQUEST['password'] : null;
$logout = (isset ($_REQUEST['logout'])) ? $_REQUEST['logout'] : false;
$LU->init ($username, $password, $logout);
define('RIGHT_NEWS_CHANGE', 2 );
define('RIGHT_NEWS_DELETE', 3 );
Documentation generated on Mon, 11 Mar 2019 14:31:02 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|