feat: new ACP option `emailPrompt`

... which allows administrators to disable the client-side prompt to
encourage users to enter or confirm their email addresses
isekai-main
Julian Lam 3 years ago
parent 5a328485dd
commit 80ea12c1c1

@ -138,6 +138,7 @@
"emailConfirmInterval": 10,
"removeEmailNotificationImages": 0,
"includeUnverifiedEmails": 0,
"emailPrompt": 1,
"inviteExpiration": 7,
"dailyDigestFreq": "off",
"digestHour": 17,

@ -40,5 +40,7 @@
"require-email-address": "Require new users to specify an email address",
"require-email-address-warning": "By default, users can opt-out of entering an email address. Enabling this option means they have to enter an email address in order to proceed with registration. <strong>It does not ensure user will enter a real email address, nor even an address they own.</strong>",
"include-unverified-emails": "Send emails to recipients who have not explicitly confirmed their emails",
"include-unverified-warning": "By default, users with emails associated with their account have already been verified, but there are situations where this is not the case (e.g. SSO logins, grandfathered users, etc). <strong>Enable this setting at your own risk</strong> &ndash; sending emails to unverified addresses may be a violation of regional anti-spam laws."
"include-unverified-warning": "By default, users with emails associated with their account have already been verified, but there are situations where this is not the case (e.g. SSO logins, grandfathered users, etc). <strong>Enable this setting at your own risk</strong> &ndash; sending emails to unverified addresses may be a violation of regional anti-spam laws.",
"prompt": "Prompt users to enter or confirm their emails",
"prompt-help": "If a user does not have an email set, or their email is not confirmed, a warning will be shown on screen."
}

@ -39,8 +39,8 @@
"email-invited": "Email was already invited",
"email-not-confirmed": "Posting in some categories or topics is enabled once your email is confirmed, please click here to send a confirmation email.",
"email-not-confirmed-chat": "You are unable to chat until your email is confirmed, please click here to confirm your email.",
"email-not-confirmed-email-sent": "Your email has not been confirmed yet, please check your inbox for the confirmation email. You won't be able to post or chat until your email is confirmed.",
"no-email-to-confirm": "Your account does not have an email set. An email is necessary for account recovery. Please click here to enter an email.",
"email-not-confirmed-email-sent": "Your email has not been confirmed yet, please check your inbox for the confirmation email. You may not be able to post in some categories or chat until your email is confirmed.",
"no-email-to-confirm": "Your account does not have an email set. An email is necessary for account recovery, and may be necessary for chatting and posting in some categories. Please click here to enter an email.",
"user-doesnt-have-email": "User \"%1\" does not have an email set.",
"email-confirm-failed": "We could not confirm your email, please try again later.",
"confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.",

@ -755,7 +755,7 @@ app.cacheBuster = null;
app.showEmailConfirmWarning = async (err) => {
const storage = await app.require('storage');
if (!app.user.uid || parseInt(storage.getItem('email-confirm-dismiss'), 10) === 1) {
if (!config.emailPrompt || !app.user.uid || parseInt(storage.getItem('email-confirm-dismiss'), 10) === 1) {
return;
}
const msg = {

@ -80,6 +80,7 @@ apiController.loadConfig = async function (req) {
size: meta.config.topicThumbSize,
},
iconBackgrounds: await user.getIconBackgrounds(req.uid),
emailPrompt: meta.config.emailPrompt,
};
let settings = config;

@ -42,6 +42,14 @@
</label>
</div>
<p class="help-block">[[admin/settings/email:include-unverified-warning]]</p>
<div class="checkbox">
<label for="emailPrompt" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input class="mdl-switch__input" type="checkbox" id="emailPrompt" data-field="emailPrompt" name="emailPrompt" />
<span class="mdl-switch__label">[[admin/settings/email:prompt]]</span>
</label>
</div>
<p class="help-block">[[admin/settings/email:prompt-help]]</p>
</form>
</div>
</div>

Loading…
Cancel
Save