CC-4829: Password Verify does not work on Lucid
-fixed
This commit is contained in:
parent
67706bede9
commit
83a450565e
2 changed files with 18 additions and 4 deletions
|
@ -36,14 +36,14 @@ class Application_Form_AddUser extends Zend_Form
|
|||
$password->addValidator($notEmptyValidator);
|
||||
$this->addElement($password);
|
||||
|
||||
$passwordIdenticalValidator = Application_Form_Helper_ValidationTypes::overridePasswordIdenticalValidator('password');
|
||||
//$passwordIdenticalValidator = Application_Form_Helper_ValidationTypes::overridePasswordIdenticalValidator('password');
|
||||
$passwordVerify = new Zend_Form_Element_Password('passwordVerify');
|
||||
$passwordVerify->setLabel(_('Verify Password:'));
|
||||
$passwordVerify->setAttrib('class', 'input_text');
|
||||
$passwordVerify->setRequired(true);
|
||||
$passwordVerify->addFilter('StringTrim');
|
||||
$passwordVerify->addValidator($notEmptyValidator);
|
||||
$passwordVerify->addValidator($passwordIdenticalValidator);
|
||||
//$passwordVerify->addValidator($passwordIdenticalValidator);
|
||||
$this->addElement($passwordVerify);
|
||||
|
||||
$firstName = new Zend_Form_Element_Text('first_name');
|
||||
|
@ -120,4 +120,11 @@ class Application_Form_AddUser extends Zend_Form
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isValid($data) {
|
||||
$passwordIdenticalValidator = Application_Form_Helper_ValidationTypes::overridePasswordIdenticalValidator(
|
||||
$data['password']);
|
||||
$this->getElement('passwordVerify')->addValidator($passwordIdenticalValidator);
|
||||
return parent::isValid($data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,14 +46,14 @@ class Application_Form_EditUser extends Zend_Form
|
|||
$password->setDecorators(array('viewHelper'));
|
||||
$this->addElement($password);
|
||||
|
||||
$passwordIdenticalValidator = Application_Form_Helper_ValidationTypes::overridePasswordIdenticalValidator('cu_password');
|
||||
//$passwordIdenticalValidator = Application_Form_Helper_ValidationTypes::overridePasswordIdenticalValidator('cu_password');
|
||||
$passwordVerify = new Zend_Form_Element_Password('cu_passwordVerify');
|
||||
$passwordVerify->setLabel(_('Verify Password:'));
|
||||
$passwordVerify->setAttrib('class', 'input_text');
|
||||
$passwordVerify->setRequired(true);
|
||||
$passwordVerify->addFilter('StringTrim');
|
||||
$passwordVerify->addValidator($notEmptyValidator);
|
||||
$passwordVerify->addValidator($passwordIdenticalValidator);
|
||||
//$passwordVerify->addValidator($passwordIdenticalValidator);
|
||||
$passwordVerify->setDecorators(array('viewHelper'));
|
||||
$this->addElement($passwordVerify);
|
||||
|
||||
|
@ -137,4 +137,11 @@ class Application_Form_EditUser extends Zend_Form
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public function isValid($data) {
|
||||
$passwordIdenticalValidator = Application_Form_Helper_ValidationTypes::overridePasswordIdenticalValidator(
|
||||
$data['cu_password']);
|
||||
$this->getElement('cu_passwordVerify')->addValidator($passwordIdenticalValidator);
|
||||
return parent::isValid($data);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue