You are here

public static function Email::getDefaultMail in Search API Saved Searches 8

Returns the default mail address to set for a new saved search.

Return value

array An array with the default value.

File

src/Plugin/search_api_saved_searches/notification/Email.php, line 349

Class

Email
Provides e-mails as a notification mechanism.

Namespace

Drupal\search_api_saved_searches\Plugin\search_api_saved_searches\notification

Code

public static function getDefaultMail() {
  $mail = \Drupal::currentUser()
    ->getEmail();
  return $mail ? [
    $mail,
  ] : [];
}