I saw this code. I removed some of the irrelevant code to make it simpler (like the identical validator that checks that the passwords match).
$password = new Zend_Form_Element_Password('password');
$password->addFilter(new My_Filters_Sha());
$password2 = new Zend_Form_Element_Password('password2');
$password2->addFilter(new My_Filters_Sha());
My question is about the filter. My guess is that whoever wrote it is saving the password in the database as a hashed and that's why they hash the password with the filter. But what's the point of having a filter handle the hashing? Shouldn't this be done once in the controller when he account is being created? When the input is received, process it to a hash and save it then. Is there a point to having this done as a filter?