I want to do email confirmation after each registration of new user in my website, so when the registration is done the system must redirect him to anther page that tells that he should confirm his email address, and only give access only to users they had an activated mail address.
My config file is:
fos_user:
db_driver: orm # other valid values are 'mongodb' and 'couchdb'
firewall_name: main
user_class: AppBundle\User
registration:
confirmation:
from_email: # Use this node only if you don't want the global email address for the confirmation email
address: test@example.com
sender_name: Example sender
enabled: true # change to true for required email confirmation
template: '@FOSUser/Registration/email.txt.twig'
This is the error I am getting:
Type error: Argument 1 passed to FOS\UserBundle\EventListener\EmailConfirmationListener::onRegistrationSuccess() must be an instance of FOS\UserBundle\Event\FormEvent, instance of FOS\UserBundle\Event\GetResponseUserEvent given
EmailConfirmationListener onRegistrationSuccess must be an instance of FormEvent