aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/notification/method/email.php
diff options
context:
space:
mode:
authorkasimi <mail@kasimi.net>2017-08-24 10:36:54 +0200
committerkasimi <mail@kasimi.net>2017-08-24 10:39:59 +0200
commitec2d983ab1864affc6fd5718fc2faede488301dd (patch)
tree5c9029ea1cd7bf21b446b6e255e62c33c450fcb0 /phpBB/phpbb/notification/method/email.php
parent1e605efaf126f5474bb1be99e7fdaed834ebb2a0 (diff)
downloadforums-ec2d983ab1864affc6fd5718fc2faede488301dd.tar
forums-ec2d983ab1864affc6fd5718fc2faede488301dd.tar.gz
forums-ec2d983ab1864affc6fd5718fc2faede488301dd.tar.bz2
forums-ec2d983ab1864affc6fd5718fc2faede488301dd.tar.xz
forums-ec2d983ab1864affc6fd5718fc2faede488301dd.zip
[ticket/15328] Disable checkbox if notification method isn't supported
PHPBB3-15328
Diffstat (limited to 'phpBB/phpbb/notification/method/email.php')
-rw-r--r--phpBB/phpbb/notification/method/email.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/phpbb/notification/method/email.php b/phpBB/phpbb/notification/method/email.php
index 21a6559012..b330aa9da8 100644
--- a/phpBB/phpbb/notification/method/email.php
+++ b/phpBB/phpbb/notification/method/email.php
@@ -56,10 +56,14 @@ class email extends \phpbb\notification\method\messenger_base
/**
* Is this method available for the user?
* This is checked on the notifications options
+ *
+ * @param \phpbb\notification\type\type_interface $notification_type An optional instance of a notification type. If provided, this
+ * method additionally checks if the type provides an email template.
+ * @return bool
*/
- public function is_available()
+ public function is_available(\phpbb\notification\type\type_interface $notification_type = null)
{
- return $this->config['email_enable'] && $this->user->data['user_email'];
+ return parent::is_available($notification_type) && $this->config['email_enable'] && $this->user->data['user_email'];
}
/**