public function Comment::getAuthorEmail in Drupal 10
Same name and namespace in other branches
- 8 core/modules/comment/src/Entity/Comment.php \Drupal\comment\Entity\Comment::getAuthorEmail()
- 9 core/modules/comment/src/Entity/Comment.php \Drupal\comment\Entity\Comment::getAuthorEmail()
File
- core/
modules/ comment/ src/ Entity/ Comment.php, line 425
Class
- Comment
- Defines the comment entity class.
Namespace
Drupal\comment\EntityCode
public function getAuthorEmail() {
$mail = $this
->get('mail')->value;
if ($this
->get('uid')->target_id != 0) {
$mail = $this
->get('uid')->entity
->getEmail();
}
return $mail;
}