Re: LiveUser singleton and singleton Log
Balarama Bosch <[email protected]> Wed, 26 Oct 2005 13:12:24 -0500
| Newsgroups | gmane.comp.php.pear.liveuser |
|---|---|
| Message-ID | <[email protected]> |
Ah... sorry about that. User error. I was extending the MDB2 class with a class of my own, in particular the readUserRights function. It had changed in the LiveUser package, and I failed to update my code properly. It seems to all be working now. Cheers, Balarama Bosch On Wed, 2005-10-26 at 11:41 -0500, Balarama Bosch wrote: > Alright, so I upgraded. > > Now I can't seem to get the perm module loaded. > I upgraded from LiveUser 0.16.2 to 0.16.7, and now when I do a > var_dump($LiveUser), $LiveUser->_perm = null > > Any thoughts as to why that may be? > > Cheers, > Balarama Bosch > > p.s. > My config file is as follows: > > $LU_conf = array( > 'debug' => true, > 'session' => array( > 'name' => LU_SESSION_NAME, > 'varname' => 'ludata', > 'force_start' => true > ), > 'login' => array( > 'force' => false > ), > 'logout' => array( > 'destroy' => true > ), > 'authContainers' => array( > 'name' => array( > 'type' => 'MDB2', > 'loginTimeout' => 0, > 'expireTime' => 0, > 'idleTime' => 3600, > 'allowDuplicateHandles' => false, > 'allowEmptyPasswords' => false, > 'passwordEncryptionMode' => 'MD5', > 'storage' => array( > 'dsn' => $LU_dsn, > 'function' => 'singleton', > 'alias' => array( > 'auth_user_id' => 'auth_user_id', > 'handle' => 'handle', > 'passwd' => 'passwd', > 'lastlogin' => 'lastlogin', > 'owner_user_id' => 'owner_user_id', > 'owner_group_id' => 'owner_group_id', > 'is_active' => 'is_active', > 'name' => 'name', > 'email' => 'email', > 'created' => 'created', > 'modified' => 'modified', > ), > 'fields' => array( > 'lastlogin' => 'timestamp', > 'is_active' => 'boolean', > 'name' => 'text', > 'email' => 'text', > 'created' => 'timestamp', > 'modified' => 'timestamp', > ), > 'tables' => array( > 'users' => array( > 'fields' => array( > 'lastlogin' => false, > 'is_active' => false, > 'name' => false, > 'email' => false, > 'created' => false, > 'modified' => false, > ), > ), > ), > ), > ), > ), > 'permContainer' => array( > 'type' => 'Medium', > 'alias' => array(), > 'storage' => array( > 'MDB2' => array( > 'dsn' => $LU_dsn, > 'function' => 'singleton', > 'prefix' => 'liveuser_', > 'tables' => array(), > 'fields' => array(), > 'alias' => array(), > ), > ), > ), > ); > > On Wed, 2005-10-26 at 14:02 +0200, Arnaud Limbourg wrote: > > Hello, > > > > You seem to be using a pretty old version of LiveUser. > > > > You will want to use something along the lines of example1 > > > > http://cvs.php.net/co.php/pear/LiveUser/docs/examples/example1/example.php > > > > Basically you can use the debug parameter to pass in a PEAR::Log object that > > will be passed to ErrorStack. > > > > Arnaud. > > > > Quoting Balarama Bosch <[email protected]>: > > > > > <code> > > > $LU =& LiveUser::singleton($conf); > > > $LU_logger =& Log::singleton('file', LOGFILE, 'ident', $log_conf); > > > $LU->addErrorLog($LU_logger); > > > </code> > > > > > > Is this right? > > > If the LiveUser object was previously inited, and a log added, will this > > > add yet another log, so that you have twice the same log? If so, how do > > > I prevent that from happening? > > > > > > Cheers, > > > Balarama > > > -- > > > > > > Balarama Bosch > > > Programmer for Krishna.com > > > www.krishna.com > > > > > > > > > _______________________________________________ > > > LiveUser mailing list > > > [email protected] > > > http://mailman.21st-hq.de/mailman/listinfo/liveuser > > > > > > > > > > > _______________________________________________ > > LiveUser mailing list > > [email protected] > > http://mailman.21st-hq.de/mailman/listinfo/liveuser > > > > _______________________________________________ > LiveUser mailing list > [email protected] > http://mailman.21st-hq.de/mailman/listinfo/liveuser >