public function createPassword(AdministratorEvent $event) { $admin = $event->getAdministrator(); $email = $admin->getEmail(); if (!empty($email)) { $renewToken = $this->tokenProvider->getToken(); $admin->setPasswordRenewToken($renewToken)->save(); $this->mailer->sendEmailMessage('new_admin_password', [ConfigQuery::getStoreEmail() => ConfigQuery::getStoreName()], [$email => $admin->getFirstname() . ' ' . $admin->getLastname()], ['token' => $renewToken, 'admin' => $admin]); } }
/** * @since 2.3.0-alpha2 */ public function confirmSubscription(NewsletterEvent $event) { $this->mailer->sendEmailMessage('newsletter_subscription_confirmation', [ConfigQuery::getStoreEmail() => ConfigQuery::getStoreName()], [$event->getEmail() => $event->getFirstname() . " " . $event->getLastname()], ['email' => $event->getEmail(), 'firstname' => $event->getFirstname(), 'lastname' => $event->getLastname()], $event->getLocale()); }