4 * BasesfGuardChangeUserPasswordForm for changing a users password
6 * @package sfDoctrineGuardPlugin
8 * @author Jonathan H. Wage <jonwage@gmail.com>
9 * @version SVN: $Id: BasesfGuardChangeUserPasswordForm.class.php 23536 2009-11-02 21:41:21Z Kris.Wallsmith $
11 class BasesfGuardChangeUserPasswordForm extends BasesfGuardUserForm
13 public function setup()
17 $this->useFields(array('password'));
19 $this->widgetSchema['password'] = new sfWidgetFormInputPassword();
20 $this->validatorSchema['password']->setOption('required', true);
21 $this->widgetSchema['password_again'] = new sfWidgetFormInputPassword();
22 $this->validatorSchema['password_again'] = clone $this->validatorSchema['password'];
23 $this->validatorSchema['password_again']->setOption('required', true);
25 $this->mergePostValidator(new sfValidatorSchemaCompare('password', sfValidatorSchemaCompare::EQUAL, 'password_again', array(), array('invalid' => 'The two passwords must be the same.')));