You are here

public function Account::getEmail in Service Container 7

Same name and namespace in other branches
  1. 7.2 src/Session/Account.php \Drupal\service_container\Session\Account::getEmail()

Returns the email address of this account.

Return value

string The email address.

Overrides AccountInterface::getEmail

File

src/Session/Account.php, line 134
Contains \Drupal\service_container\Session\Account.

Class

Account
Wraps the global user to provide the account interface.

Namespace

Drupal\service_container\Session

Code

public function getEmail() {
  return $GLOBALS['user']->mail;
}