RE: checkRight function on the LiveUser object
"Jan Bolmeson" <[email protected]>
| Newsgroups | gmane.comp.php.pear.liveuser |
|---|---|
| Message-ID | <[email protected]> |
I have a init-check on the LiveUser closely to the bottom but it doesn't
return an error. I think I get the error posted in my previous mail when I
instanceiate the admin object.
Thanks for taking the time and helping me,
Jan
Here is my file "init.liveuser.php": (I think $db and $dsn should be correct
since most of the add and get functions of both the admin class and the
client class do work)
-------------------------------------------------------------------------
$GLOBALS['_LIVEUSER_DEBUG'] = true;
$dsn = Library::getValue('DB','dsn');
function echoQuery(&$db, $scope, $message)
{
Var_Dump::display($scope.': '.$message);
}
$dummy = new DB;
$db = $dummy->connect($dsn);
if (PEAR::isError($db)) {
echo $db->getMessage() . ' ' . $db->getUserInfo();
die();
}
$db->setFetchMode('DB_FETCHMODE_ASSOC');
//session_destroy();
$conf =
array(
'autoInit' => false,
'session' => array(
'name' => 'PHPSESSION',
'varname' => 'ludata'
),
'login' => array(
'force' => false,
),
'logout' => array(
'destroy' => true,
),
'authContainers' => array(
'DB' => array(
'type' => "DB",
'loginTimeout' => 0,
'expireTime' => 3600,
'idleTime' => 1800,
'allowDuplicateHandles' => 0,
'storage' => array(
'connection' => $db,
'dsn' => $dsn,
'prefix' => 'liveuser_',
'tables' => array(
'users' => array(
'fields' => array(
'email' => true,
'company_id' => true,
'firstname' => true,
'lastname' => true
),
),
),
'fields' => array(
'firstname' => 'text',
'lastname' => 'text',
'company_id' => 'text',
'email' => 'text',
),
'alias' => array(
'company_id' => 'company_id',
'email' => 'email',
'firstname' => 'firstname',
'lastname' => 'lastname'
),
// 'force_seq' => false
),
)
),
'permContainer' => array(
'type' => 'Complex',
'alias' => array(),
'storage' => array(
"DB" => array(
'connection' => $db,
'dsn' => $dsn,
'prefix' => 'liveuser_',
'tables' => array(),
'fields' => array(),
'alias' => array(),
// 'force_seq' => false
),
),
),
);
/**
* Create the $LU object from the $conf and put it into our Application
Registry
*/
$LU = & LiveUser::singleton($conf);
if (!$LU->init()) {
var_dump( $LU->getErrors() );
die("failed to init liveuser");
}
$LU->config = $conf;
Library::instance("liveuser", $LU);
//Uglyhack
define("EXPIRE_TIME",$LU->authContainers['DB']['expireTime']);
unset($LU);
unset($conf);
unset($db);
-------------------------------------------------------------
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Lukas Smith
Sent: den 20 juni 2005 09:14
To: LiveUser-DevList
Subject: Re: [LiveUser] checkRight function on the LiveUser object
Jan Bolmeson wrote:
> I have been troubleshooting some more and also found the following error -
I
> don't really know how to fix it... Maybe it is one reason to why I fail
the
> checkRIght...
Actually its not that the mapping didnt work. Its that the storage
container could not be instanciated. Please give us your config setup,
specifically the permContainer part.
regards,
Lukas Smith
[email protected]
_______________________________
BackendMedia
www.backendmedia.com
[email protected]
Linn Zwoch Smith GbR
Pariser Str. 44
D-10707 Berlin
Tel +49 30 83 22 50 00
Fax +49 30 83 22 50 07
_______________________________________________
LiveUser mailing list
[email protected]
http://mailman.21st-hq.de/mailman/listinfo/liveuser