v1.18.x
Julian Lam 7 years ago
parent 47606c8df5
commit 13a3f44ed3

@ -19,5 +19,14 @@
"terms_of_use_error": "You must agree to the Terms of Use",
"registration-added-to-queue": "Your registration has been added to the approval queue. You will receive an email when it is accepted by an administrator.",
"interstitial.intro": "We require some additional information before we can create your account.",
"interstitial.errors-found": "We could not complete your registration:"
"interstitial.errors-found": "We could not complete your registration:",
"gdpr_lead": "This community forum collects and processes your personal information.",
"gdpr_intro": "We use this information strictly to personalise your experience in this community, as well as to associate the posts you make to your user account. During the registration step you were asked to provide a username and email address, you can also optionally provide additional information to complete your user profile on this website.<br /><br />We retain this information for the life of your user account, and you are able to withdraw consent at any time by deleting your account. At any time you may request a copy of your contribution to this website, via your user settings page.<br /><br />If you have any questions or concerns, we encourage you to reach out to this forum's administrative team.",
"gdpr_email_intro": "Occasionally, we may send emails to your registered email address in order to provide updates and/or to notify you of new activity that is pertinent to you. You can customise the frequency of the community digest (including disabling it outright), as well as select which types of notifications to receive via email.",
"gdpr_digest_frequency": "By default, this community delivers email digests every %1.",
"gdpr_digest_off": "Currently, this community does not send out email digests",
"gdpr_agree_data": "I consent to the collection and processing of my personal information on this website.",
"gdpr_agree_email": "I consent to receive digest and notification emails from this website.",
"gdpr_consent_denied": "You must give consent to this site to collect/process your information, and to send you emails."
}

@ -348,25 +348,50 @@ User.getModeratedCids = function (uid, callback) {
User.addInterstitials = function (callback) {
plugins.registerHook('core', {
hook: 'filter:register.interstitial',
method: function (data, callback) {
if (meta.config.termsOfUse && !data.userData.acceptTos) {
data.interstitials.push({
template: 'partials/acceptTos',
data: {
termsOfUse: meta.config.termsOfUse,
},
callback: function (userData, formData, next) {
if (formData['agree-terms'] === 'on') {
userData.acceptTos = true;
}
next(userData.acceptTos ? null : new Error('[[register:terms_of_use_error]]'));
},
});
}
method: [
// GDPR information collection/processing consent + email consent
function (data, callback) {
if (!data.userData.gdpr_consent) {
data.interstitials.push({
template: 'partials/gdpr_consent',
data: {
digestFrequency: meta.config.dailyDigestFreq,
digestEnabled: meta.config.dailyDigestFreq !== 'off',
},
callback: function (userData, formData, next) {
if (formData.gdpr_agree_data === 'on' && formData.gdpr_agree_email === 'on') {
userData.gdpr_consent = true;
}
next(userData.gdpr_consent ? null : new Error('[[register:gdpr_consent_denied]]'));
},
});
}
callback(null, data);
},
setImmediate(callback, null, data);
},
// Forum Terms of Use
function (data, callback) {
if (meta.config.termsOfUse && !data.userData.acceptTos) {
data.interstitials.push({
template: 'partials/acceptTos',
data: {
termsOfUse: meta.config.termsOfUse,
},
callback: function (userData, formData, next) {
if (formData['agree-terms'] === 'on') {
userData.acceptTos = true;
}
next(userData.acceptTos ? null : new Error('[[register:terms_of_use_error]]'));
},
});
}
setImmediate(callback, null, data);
},
],
});
callback();

@ -46,6 +46,7 @@ module.exports = function (User) {
lastposttime: 0,
banned: 0,
status: 'online',
gdpr_consent: data.gdpr_consent === true ? 1 : 0,
};
User.uniqueUsername(userData, next);

@ -0,0 +1,23 @@
<div class="form-group">
<p class="lead">[[register:gdpr_lead]]</p>
<p>[[register:gdpr_intro]]</p>
<div class="checkbox">
<label>
<input type="checkbox" name="gdpr_agree_data" id="gdpr_agree_data"> <strong>[[register:gdpr_agree_data]]</strong>
</label>
</div>
<p>
[[register:gdpr_email_intro]]
<!-- IF digestEnabled -->
[[register:gdpr_digest_frequency, {digestFrequency}]]
<!-- ELSE -->
[[register:gdpr_digest_off]]
<!-- END -->
</p>
<div class="checkbox">
<label>
<input type="checkbox" name="gdpr_agree_email" id="gdpr_agree_email"> <strong>[[register:gdpr_agree_email]]</strong>
</label>
</div>
</div>
Loading…
Cancel
Save