mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-02 02:21:14 +01:00
closes #6347
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
"welcome.cta": "Click here to confirm your email address",
|
||||
|
||||
"invitation.text1": "%1 has invited you to join %2",
|
||||
"invitation.text2": "Your invitation will expire in %1 days.",
|
||||
"invitation.ctr": "Click here to create your account.",
|
||||
|
||||
"reset.text1": "We received a request to reset your password, possibly because you have forgotten it. If this is not the case, please ignore this email.",
|
||||
|
||||
@@ -60,7 +60,8 @@ module.exports = function (User) {
|
||||
var token = utils.generateUUID();
|
||||
var registerLink = nconf.get('url') + '/register?token=' + token + '&email=' + encodeURIComponent(email);
|
||||
|
||||
var expireIn = (parseInt(meta.config.inviteExpiration, 10) || 1) * 86400000;
|
||||
var expireDays = (parseInt(meta.config.inviteExpiration, 10) || 7);
|
||||
var expireIn = expireDays * 86400000;
|
||||
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
@@ -93,6 +94,7 @@ module.exports = function (User) {
|
||||
subject: subject,
|
||||
username: username,
|
||||
template: 'invitation',
|
||||
expireDays: expireDays,
|
||||
};
|
||||
|
||||
// Append default data to this email payload
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>[[admin/settings/user:invite-expiration]]</label>
|
||||
<input type="number" class="form-control" data-field="inviteExpiration" placeholder="1">
|
||||
<input type="number" class="form-control" data-field="inviteExpiration" placeholder="7">
|
||||
<p class="help-block">
|
||||
[[admin/settings/user:invite-expiration-help]]
|
||||
</p>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<td style="padding: 40px; font-family: sans-serif; font-size: 15px; line-height: 20px; color: #555555;">
|
||||
<h1 style="margin: 0 0 10px 0; font-family: sans-serif; font-size: 24px; line-height: 27px; color: #333333; font-weight: normal;">[[email:greeting_no_name]]</h1>
|
||||
<p style="margin: 0;">[[email:invitation.text1, {username}, {site_title}]]</p>
|
||||
<p style="margin: 0;">[[email:invitation.text2, {expireDays}]]</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user