function NotificationHandler::getAdminAddress
Same name and namespace in other branches
- main core/modules/user/src/NotificationHandler.php \Drupal\user\NotificationHandler::getAdminAddress()
Returns the account admin email address.
Return value
non-empty-string|null Email address of the account admin.
2 calls to NotificationHandler::getAdminAddress()
- NotificationHandler::getReplyToAddress in core/
modules/ user/ src/ NotificationHandler.php - Returns the email address used in the reply-to field.
- NotificationHandler::sendRegisterPendingApprovalAdmin in core/
modules/ user/ src/ NotificationHandler.php - Sends a notification email to the admin about an account pending approval.
File
-
core/
modules/ user/ src/ NotificationHandler.php, line 170
Class
- NotificationHandler
- Implements a service to dispatch user notification messages.
Namespace
Drupal\userCode
protected function getAdminAddress() : ?string {
// Get the custom site notification email if it has been set.
$siteConfig = $this->configFactory
->get('system.site');
$adminAddress = $siteConfig->get('mail_notification');
// If the custom site notification email has not been set, we use the site
// default for this.
if (empty($adminAddress)) {
$adminAddress = $siteConfig->get('mail');
}
return $adminAddress ?: NULL;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.