Liveuser - Exception on not supported?
| From: | Jeroen Houben | Date: | Tue, 30 Aug 2005 13:00:05 +0000 |
| Subject: | Liveuser - Exception on not supported? | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-39626@lists.php.net to get a copy of this message | ||
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