Exemple #1
0
 public function sendRegisterConfirmEmail(UserInterface $user, $template = null, $route = null)
 {
     $tokenGenerator = $this->container->get('fos_user.util.token_generator');
     $user->setConfirmationToken($tokenGenerator->generateToken());
     $this->container->get('fos_user.mailer')->sendRegisterConfirmMessage($user, $template, $route);
     $this->updateUser($user);
 }
Exemple #2
0
 public function sendResetEmail(UserInterface $user, $template = null, $route = null)
 {
     $tokenGenerator = $this->container->get('fos_user.util.token_generator');
     $user->setConfirmationToken($tokenGenerator->generateToken());
     $this->container->get('fos_user.mailer')->sendResettingEmailMessage($user, $template, $route);
     $user->setPasswordRequestedAt(new \DateTime());
     $this->updateUser($user);
 }