aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/notification/type/post.php12
-rw-r--r--phpBB/includes/notification/type/topic.php12
2 files changed, 24 insertions, 0 deletions
diff --git a/phpBB/includes/notification/type/post.php b/phpBB/includes/notification/type/post.php
index ee26a8c33e..0681b4418c 100644
--- a/phpBB/includes/notification/type/post.php
+++ b/phpBB/includes/notification/type/post.php
@@ -223,7 +223,19 @@ class phpbb_notification_type_post extends phpbb_notification_type_base
*/
public function get_email_template_variables()
{
+ if ($this->get_data('post_username'))
+ {
+ $username = $this->get_data('post_username');
+ }
+ else
+ {
+ $user_data = $this->notification_manager->get_user($this->get_data('poster_id'));
+
+ $username = get_username_string('username', $user_data['user_id'], $user_data['username'], $user_data['user_colour']);
+ }
+
return array(
+ 'AUTHOR_NAME' => htmlspecialchars_decode($username),
'POST_SUBJECT' => htmlspecialchars_decode(censor_text($this->get_data('post_subject'))),
'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($this->get_data('topic_title'))),
diff --git a/phpBB/includes/notification/type/topic.php b/phpBB/includes/notification/type/topic.php
index 237f430003..a9beb469c3 100644
--- a/phpBB/includes/notification/type/topic.php
+++ b/phpBB/includes/notification/type/topic.php
@@ -186,7 +186,19 @@ class phpbb_notification_type_topic extends phpbb_notification_type_base
*/
public function get_email_template_variables()
{
+ if ($this->get_data('post_username'))
+ {
+ $username = $this->get_data('post_username');
+ }
+ else
+ {
+ $user_data = $this->notification_manager->get_user($this->get_data('poster_id'));
+
+ $username = get_username_string('username', $user_data['user_id'], $user_data['username'], $user_data['user_colour']);
+ }
+
return array(
+ 'AUTHOR_NAME' => htmlspecialchars_decode($username),
'FORUM_NAME' => htmlspecialchars_decode($this->get_data('forum_name')),
'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($this->get_data('topic_title'))),