You are here

public function SocialSendEmail::getEmail in Open Social 10.3.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::getEmail()
  2. 8.5 modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::getEmail()
  3. 8.6 modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::getEmail()
  4. 8.7 modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::getEmail()
  5. 8.8 modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::getEmail()
  6. 10.0.x modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::getEmail()
  7. 10.1.x modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::getEmail()
  8. 10.2.x modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::getEmail()

Returns the email address of this account.

Parameters

\Drupal\user\UserInterface $account: The user object.

Return value

string|null The email address, or NULL if the account is anonymous or the user does not have an email address.

File

modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php, line 208

Class

SocialSendEmail
An example action covering most of the possible options.

Namespace

Drupal\social_user\Plugin\Action

Code

public function getEmail(UserInterface $account) {
  return $account
    ->getEmail();
}