namespace Wallabag\UserBundle\Mailer;
-use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface;
use Scheb\TwoFactorBundle\Mailer\AuthCodeMailerInterface;
+use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface;
/**
* Custom mailer for TwoFactorBundle email.
*
* @param TwoFactorInterface $user
*/
- public function sendAuthCode(TwoFactorInterface $user)
+ public function sendAuthCode(TwoFactorInterface $user): void
{
$template = $this->twig->loadTemplate('WallabagUserBundle:TwoFactor:email_auth_code.html.twig');
$message = new \Swift_Message();
$message
- ->setTo($user->getEmail())
+ ->setTo($user->getEmailAuthRecipient())
->setFrom($this->senderEmail, $this->senderName)
->setSubject($subject)
->setBody($bodyText, 'text/plain')