コード例 #1
0
 /**
  * Build email template.
  *
  * @param User $user
  *
  * @return array
  */
 private function buildTemplate(User $user)
 {
     $this->logger->info('OnUserForgotPasswordListener buildTemplate()');
     $email = array();
     $email['subject'] = 'Reset password link on ' . $this->siteName;
     $email['fullName'] = $user->getFullName();
     $email['password'] = $user->getTransient();
     $email['username'] = $user->getEmail();
     $email['emailAddress'] = $user->getEmail();
     $email['authString'] = $user->getForgotPassword();
     $email['bodyHTML'] = $this->templating->render('MlankaTechAppBundle:Email/Html/User:forgot_password_reset.html.twig', $email);
     $email['bodyTEXT'] = $this->templating->render('MlankaTechAppBundle:Email/Text/User:new_account_created.txt.twig', $email);
     return $email;
 }