QuickForm: set csrf value through addHidden
This commit is contained in:
parent
69b394cda5
commit
de843b19ed
|
@ -155,10 +155,10 @@ abstract class QuickForm extends Zend_Form
|
|||
public function regenerateCsrfToken()
|
||||
{
|
||||
if (! $element = $this->getElement(self::CSRF)) {
|
||||
$this->addHidden(self::CSRF);
|
||||
$this->addHidden(self::CSRF, CsrfToken::generate());
|
||||
$element = $this->getElement(self::CSRF);
|
||||
}
|
||||
$element->setValue(CsrfToken::generate())->setIgnore(true);
|
||||
$element->setIgnore(true);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue