Introduce PF_MIN_REGISTRATION_AGE env var (config pixelfed.min_registration_age,
default 16) and replace hardcoded age values in the curated register flow,
safety tips, parental control invite form, and auth lang strings.
Refs pixelfed/pixelfed#7358
'age' => 'I am at least '.(int) config('pixelfed.min_registration_age', 16).' years old',
'terms' => 'By signing up, you agree to our <ahref="'.route('site.terms').'"class="font-weight-bold text-dark">Terms of Use</a> and <ahref="'.route('site.privacy').'"class="font-weight-bold text-dark">Privacy Policy</a>.',
text: "Please select the region you are located in",
icon: "info",
buttons: {
cancel: false,
usa: {
text: "United States",
className: "swal-button--cancel",
value: "usa"
},
uk: {
text: "UK",
className: "swal-button--cancel",
value: "uk"
},
eu: {
text: "EU",
className: "swal-button--cancel",
value: "eu"
},
other: {
text: "Other",
className: "swal-button--cancel",
value: "other"
}
},
dangerMode: false,
}).then((region) => {
handleRegion(region);
})
promptDateOfBirth();
}
function handleRegion(region) {
if(!region) {
return;
}
let minAge = 16;
if(['usa', 'uk', 'other'].includes(region)) {
minAge = 13;
}
function promptDateOfBirth() {
swal({
title: "Enter Your Date of Birth",
text: "We require your birthdate solely to confirm that you meet our age requirement.\n\n Rest assured, this information is not stored or used for any other purpose.",
@ -126,7 +92,7 @@ $id = Str::random(14);
} else {
swal({
title: "Ineligible to join",
text: `Sorry, you must be at least ${minAge} years old to join our service according to the laws of your country or region.`,
text: `Sorry, you must be at least ${minAge} years old to join this server.`,
<pclass="mb-0">Please keep in mind that Pixelfed is meant for people over the age of 16 or 13 depending on where you live.</p>
<pclass="mb-0">Please keep in mind that this server is meant for people who are at least {{ (int) config('pixelfed.min_registration_age', 16) }} years old.</p>