Re: Liveuser - Exception on not supported?
| From: | Jeroen Houben | Date: | Wed, 31 Aug 2005 07:23:03 +0000 |
| Subject: | Re: Liveuser - Exception on not supported? | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-39650@lists.php.net to get a copy of this message | ||
Arnaud Limbourg wrote:
Jeroen Houben wrote:But it's not. LiveUser_Auth_PEARAuth does not contain such a method.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 /**It's supposed to be overriden in a subclass,* 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
this methos should never be called, hence the exception ;)So is this is a bug or should I subclass LiveUser_Auth_PEARAuth myself? Regards, Jeroen