You are here

public function UserEmailVerification::sendVerifyBlockedMail in User email verification 8

Send "blocked account verified Email" mail to site administrator.

Parameters

\Drupal\user\UserInterface $user: Blocked user who verified Email.

Return value

bool Action result.

Overrides UserEmailVerificationInterface::sendVerifyBlockedMail

File

src/UserEmailVerification.php, line 426

Class

UserEmailVerification
User email verification helper service.

Namespace

Drupal\user_email_verification

Code

public function sendVerifyBlockedMail(UserInterface $user) {
  $mail = $this->mailManager
    ->mail('user_email_verification', 'verify_blocked', $this->configSystemSite
    ->get('mail'), $this->languageManager
    ->getDefaultLanguage()
    ->getId(), [
    'user' => $user,
  ]);
  return $mail && isset($mail['result']) ? $mail['result'] : FALSE;
}