Skip to content

Node.js based forum software built for the modern web

Add User (uid) Welcome Notification (#6045)

acardinale5ed6b5c41424
diff --git a/public/language/en-GB/admin/settings/notifications.json b/public/language/en-GB/admin/settings/notifications.json
index 4eff7f341a..da6c9680a3 100644
--- a/public/language/en-GB/admin/settings/notifications.json
+++ b/public/language/en-GB/admin/settings/notifications.json
@@ -1,5 +1,6 @@
{
"notifications": "Notifications",
"welcome-notification": "Welcome Notification",
- "welcome-notification-link": "Welcome Notification Link"
+ "welcome-notification-link": "Welcome Notification Link",
+ "welcome-notification-uid": "Welcome Notification User (UID)"
}
\ No newline at end of file
diff --git a/src/user/notifications.js b/src/user/notifications.js
index a446a9a822..04bc0fae9f 100644
--- a/src/user/notifications.js
+++ b/src/user/notifications.js
@@ -320,6 +320,7 @@ UserNotifications.sendWelcomeNotification = function (uid, callback) {
bodyShort: meta.config.welcomeNotification,
path: path,
nid: 'welcome_' + uid,
+ from: meta.config.welcomeUid ? meta.config.welcomeUid : null,
}, next);
},
function (notification, next) {
diff --git a/src/views/admin/settings/notifications.tpl b/src/views/admin/settings/notifications.tpl
index 803922d17b..3e68295699 100644
--- a/src/views/admin/settings/notifications.tpl
+++ b/src/views/admin/settings/notifications.tpl
@@ -6,6 +6,7 @@
<form>
<strong>[[admin/settings/notifications:welcome-notification]]</strong><br /> <textarea class="form-control" data-field="welcomeNotification"></textarea><br />
<strong>[[admin/settings/notifications:welcome-notification-link]]</strong><br /> <input type="text" class="form-control" data-field="welcomeLink"><br />
+ <strong>[[admin/settings/notifications:welcome-notification-uid]]</strong><br /> <input type="text" class="form-control" data-field="welcomeUid"><br />
</form>
</div>
</div>