If one tries to override a module action using the example in Listing 14-29, a PHP error is generated:
PHP Fatal error: Call to a member function getParameter() on a non-object
This non-object refers to the parameter "$request" which happens to be uninitialized.
To find the correct way of handling this I looked at one of the admin generated actions. So to follow the way the admin generator works, listing 14-29 should probably read as follows:
class userActions extends autouserActions
{
protected function updateUserFromRequest()
{
// Handle the input of the partial field
$user = $this->getRequestParameter('user');
if (isset($user['newpassword']))
{
$this->user->setPassword($user['newpassword']);
}
// Let symfony handle the other fields
parent::updateUserFromRequest();
}
}