Re: Liveuser - Exception on not supported?

From: Date: Tue, 30 Aug 2005 16:07:19 +0000
Subject: Re: Liveuser - Exception on not supported?
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-39633@lists.php.net to get a copy of this message
Jeroen Houben wrote:
Hi, I'm wondering if it's really good practise to trigger an exception when the Auth container cannot update userdata. The code in Common.php /**
    * Writes current values for user back to the database.
    * This method does nothing in the base class and is supposed to
    * be overridden in subclasses according to the supported backend.
    *
    * @return void
    *
    * @access private
    */
function _updateUserData() {
       $this->_stack->push(LIVEUSER_ERROR_NOT_SUPPORTED, 'exception',
           array('feature' => '_updateUserData')
       );
       return false;
} If for instance you use PEAR::Auth with the RADIUS container, it's quite obvious that the userdata won't get updated, so therefore I don't expect it to be updated. I therefore don't expect an Exception to be fired when liveuser finds out it can't update the userdata. I think a simple "return false" will do here, or maybe a less severe error can be triggered (although I wouldn't even call it an error). Just my 2 cents, Jeroen It's supposed to be overriden in a subclass, this methos should never be called, hence the exception ;)
Arnaud.

« previous php.pear.dev (#39633) next »