[sork] passwd module and poppassd driver errors

Eric Rostetter eric.rostetter at physics.utexas.edu
Tue Jan 28 09:28:51 PST 2003


Quoting Leena Heino <Leena.Heino at uta.fi>:

> It seems that the error message returned by poppassd is ignored.
> in _getPromt()
> ...
>   return PEAR::raiseError($prompt);
> 
> But in change_password()
> ...
> if (is_a($res, 'PEAR_Error')) {
>   return PEAR::raiseError(_("Error Changing Password"));
> 
> Which overwrites the previous error message and user only gets the
> error message "Error Changing Password". This error message is very vague
> and confusing as it does not give user any hint as to what really might
> have gone wrong with the password change.

Yep, I'll fix this asap, so it makes it into RC2 (if there is one) and
the next release.
 
> Maybe the better solution would be to return $res not the vague error
> message "Error Changing Password".
> if (is_a($res, 'PEAR_Error')) {
>    return $res
> }
>
> The downside with solution like this is that we lose the translated
> message.

The solution is to include both.

-- 
Eric Rostetter
The Department of Physics
The University of Texas at Austin

Why get even? Get odd!


More information about the sork mailing list