Пример #1
0
 public function testSendResetPasswordEmail()
 {
     $this->assertSendCalled(Processor::RESET_PASSWORD_EMAIL_TEMPLATE_NAME, ['entity' => $this->user], $this->buildMessage($this->user->getEmail()));
     $this->mailProcessor->sendResetPasswordEmail($this->user);
 }
Пример #2
0
 /**
  * Get the truncated email displayed when requesting the resetting.
  * The default implementation only keeps the part following @ in the address.
  *
  * @param AccountUser $user
  *
  * @return string
  */
 protected function getObfuscatedEmail(AccountUser $user)
 {
     $email = $user->getEmail();
     if (false !== ($pos = strpos($email, '@'))) {
         $email = '...' . substr($email, $pos);
     }
     return $email;
 }