danrossi/ZfcUser — comment on commit b13df5b91781e5acf672396ea4d6b59782cb0b85
File:  line 0
By danrossi:

Use case which is currently setup in the Application module bootstrap for now.

$events->attach('ZfcUser\Service\User', 'register-pre-save', function($e) use ($config, $app) {
$params = $e->getParams();
$form = $app->getLocator()->get('custom_register_form');
return $form->update($params["user"]);
});

$events->attach('ZfcUser\Service\User', 'register-post-save', function($e) use ($config, $app) {
$params = $e->getParams();
});

$events->attach('ZfcUser\Controller\UserController', 'register-validate-error', function($e) use ($config,
$app) {
$params = $e->getParams();
var_dump($params["form"]->getMessages());
});