1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 20:13:22 +01:00

[ticket/11452] Now notification_method_email checks whether user has address.

Make sure the user has an email address set before offering email
notifications. The address could be missing for whatever reason, e.g. external
authentication. This is also consistent with XMPP/Jabber now.

PHPBB3-11452
This commit is contained in:
Andreas Fischer 2013-03-17 19:54:32 +01:00
parent 51c1ba12c1
commit 58d7acbf5a

View File

@ -53,7 +53,7 @@ class phpbb_notification_method_email extends phpbb_notification_method_base
*/
public function is_available()
{
return (bool) $this->config['email_enable'];
return $this->config['email_enable'] && $this->user->data['user_email'];
}
/**