Skip to content
Snippets Groups Projects
Commit 362d1869 authored by Lucas Hedding's avatar Lucas Hedding Committed by Lucas Hedding
Browse files

Issue #3075524 by heddn: Honour 'notification' toggle for emails

parent 0994c72a
No related branches found
No related tags found
No related merge requests found
......@@ -109,6 +109,10 @@ class Notify implements NotifyInterface {
* {@inheritdoc}
*/
public function send() {
// Don't send mail if notifications are disabled.
if (!$this->configFactory->get('automatic_updates.settings')->get('notify')) {
return;
}
$messages = $this->automaticUpdatesPsa->getPublicServiceMessages();
if (!$messages) {
return;
......
{#
/**
* @file
* Template for the public service annoucements email notification.
* Template for the public service announcements email notification.
*
* Available variables:
* - messages: The messages array
......@@ -27,7 +27,9 @@
<li>{{ message }}</li>
{% endfor %}
</ul>
<p>To see all PSAs, visit <a href="https://www.drupal.org/security/psa" target="_blank">https://www.drupal.org/security/psa</a>.</p>
<p>
{{ 'To see all PSAs, visit <a href="@uri">@uri</a>.'|t({'@uri': 'https://www.drupal.org/security/psa'}) }}
</p>
<p>
{% set settings_link = path('automatic_updates.settings') %}
{% trans %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment