Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email confirmation after registration? #682

Open
gkzsolt opened this issue Jun 15, 2018 · 3 comments
Open

Email confirmation after registration? #682

gkzsolt opened this issue Jun 15, 2018 · 3 comments

Comments

@gkzsolt
Copy link

gkzsolt commented Jun 15, 2018

Hi,
Is there a confirmation by email flow supported by ZfcUser after registration?

@jroedel
Copy link

jroedel commented Apr 23, 2019

Hi there. Better late than never they say.

There's no code integrated into ZfcUser for confirmation emails, but you can tie into the register.post event provided by the module. Place this in your Module code:

public function onBootstrap(MvcEvent $e)
{
  $sm = $e->getApplication()->getServiceManager();
  /** @var User $userService */
  $userService = $sm->get('zfcuser_user_service');
  $events = $userService->getEventManager();
  $events->attach('register.post', function($e) {
    ...
  }, 100);
}

Or you can attach an event listener. I use a Mailer class that listens to the events. Example: https://github.com/jroedel/zf2-juser/blob/8105d2c664b97b0e5d0c0b2739aaba6961b3d366/src/Module.php#L46

@stijnhau
Copy link

stijnhau commented Jul 6, 2019

Would there be someone intrested if this is implemented in the core?
Only difficult to decide what mail libraray to use and so on.

@jroedel
Copy link

jroedel commented Jul 7, 2019

That'd be great to have it as part of the core! I went with acMailer after going through 1 or 2 other libraries beforehand. I think that's the most active library on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants