User::getEmail

public User::getEmail()

Returns the email address of this account.

Return value

string The email address.

Overrides AccountInterface::getEmail

File

core/modules/user/src/Entity/User.php, line 222

Class

User
Defines the user entity class.

Namespace

Drupal\user\Entity

Code

public function getEmail() {
  return $this->get('mail')->value;
}
doc_Drupal
2016-10-29 09:52:06
Comments
Leave a Comment

Please login to continue.