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

1
2
3
public function getEmail() {
  return $this->get('mail')->value;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.