From bee3cbfbd32bf19f6f8001eaf9e1cc6a41395686 Mon Sep 17 00:00:00 2001 From: Lionel Gaillard Date: Thu, 29 Jun 2017 11:14:21 +0200 Subject: [PATCH] ChangePasswordFilter also trigger the `init` event I was trying to add a custom `PasswordStrengthValidator`, and expected an `init` event just like `LoginFilter` and `RegisterFilter`. This little line would have made it simpler. Hope it will help. --- src/ZfcUser/Form/ChangePasswordFilter.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ZfcUser/Form/ChangePasswordFilter.php b/src/ZfcUser/Form/ChangePasswordFilter.php index be6eb42c..e82f6846 100644 --- a/src/ZfcUser/Form/ChangePasswordFilter.php +++ b/src/ZfcUser/Form/ChangePasswordFilter.php @@ -2,10 +2,10 @@ namespace ZfcUser\Form; -use Zend\InputFilter\InputFilter; +use ZfcUser\InputFilter\ProvidesEventsInputFilter; use ZfcUser\Options\AuthenticationOptionsInterface; -class ChangePasswordFilter extends InputFilter +class ChangePasswordFilter extends ProvidesEventsInputFilter { public function __construct(AuthenticationOptionsInterface $options) { @@ -76,5 +76,7 @@ public function __construct(AuthenticationOptionsInterface $options) array('name' => 'StringTrim'), ), )); + + $this->getEventManager()->trigger('init', $this); } }