diff --git a/install/data/defaults.json b/install/data/defaults.json index dfe0c2b7bc..3b92872280 100644 --- a/install/data/defaults.json +++ b/install/data/defaults.json @@ -138,6 +138,7 @@ "emailConfirmInterval": 10, "removeEmailNotificationImages": 0, "includeUnverifiedEmails": 0, + "emailPrompt": 1, "inviteExpiration": 7, "dailyDigestFreq": "off", "digestHour": 17, diff --git a/public/language/en-GB/admin/settings/email.json b/public/language/en-GB/admin/settings/email.json index 1121da568a..65f579d28c 100644 --- a/public/language/en-GB/admin/settings/email.json +++ b/public/language/en-GB/admin/settings/email.json @@ -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. It does not ensure user will enter a real email address, nor even an address they own.", "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). Enable this setting at your own risk – 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). Enable this setting at your own risk – 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." } diff --git a/public/language/en-GB/error.json b/public/language/en-GB/error.json index 77ef15c699..0b5e714e26 100644 --- a/public/language/en-GB/error.json +++ b/public/language/en-GB/error.json @@ -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.", diff --git a/public/src/app.js b/public/src/app.js index d909fd9f15..63787b6fe3 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -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 = { diff --git a/src/controllers/api.js b/src/controllers/api.js index 3e4e2fa216..984ea98e42 100644 --- a/src/controllers/api.js +++ b/src/controllers/api.js @@ -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; diff --git a/src/views/admin/settings/email.tpl b/src/views/admin/settings/email.tpl index e358692127..7f90431b96 100644 --- a/src/views/admin/settings/email.tpl +++ b/src/views/admin/settings/email.tpl @@ -42,6 +42,14 @@

[[admin/settings/email:include-unverified-warning]]

+ +
+ +
+

[[admin/settings/email:prompt-help]]