Discourse Age Check

:information_source: Summary Performs age checking on the signup form
:hammer_and_wrench: Repository GitHub - communiteq/discourse-tc-age-check
:question: Install Guide How to install a theme or theme component
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

Performs an age check on the signup form based on the users birthday

Configuration

  • install the theme component
  • create a Birthday user field with type Date and check “show on signup form” and “required on signup”
  • configure the settings
    • age check field name the name of the user field you created in the previous step
    • age check minimum age the minimum age (set to 0 if you don’t require a minimum age)
    • age check maximum age the maximum age (leave at 120 if you don’t require a maximum age)

Disclaimer

This is an age check, not an age verification.
A user can circumvent this check by choosing a different birthdate.

15 Likes

5 posts were split to a new topic: Storing date of birth in relation to GDPR

Would it be possible to make it so the DOB userfield is only available to admin and not mods / only available with a button click (the way email and IP are handled in core), or would something like that require a plugin rather than a theme component?

1 Like

That is outside of the scope for this theme component (and it would indeed require a plugin).

The only thing it does is add a validation on an already existing user field, and as a consequence it will prevent account creation / storing the associated data for minors. It does not manipulate the user field in any way.

1 Like

Richard i want to say this is really helpful something i have been wanting for my forum for some time now! Despite the user’s being able to get around it do you think if a user puts a birthday not old enough then changes it to use the forum admins are notified oh user first put X date then changed it so staff can be aware?

IIRC sending notifications are plugin-level.

You mean all still while at the signup field? A user cannot sign up if they put too low a birthday.

he said

I’m going to think about this, interesting idea.

3 Likes

Although it is an interesting discussion, please limit this topic to the age check theme component itself.

This component merely adds a check to an existing user field. It does not introduce potential privacy issues - on the contrary: it can prevent minors from signing up.

I’ve moved all the posts concerning GDPR to their own topic here Storing date of birth in relation to GDPR

6 Likes

True that Nate but it could be possible i feel like without it?

Like an email maybe user tried to sign up with too low age then signed up with changed aged or something.

1 Like

Is that issue not solved by simply unchecking “Editable after sign-up,” and then setting the field to “on signup” ? Users shouldn’t have any reason to change a DoB field once past the age check.

What he means is that someone changes it while signing up.

I.e. someone is 16 and enters 1 Feb 2010 as birth date. The theme component says “you must be 18 to sign up” and then the kid changes it to 1 Feb 2008 and is able to sign up. The idea is to flag the first failed attempt as suspicious so the admins can for instance ask for proof.

5 Likes

Ohhhh, I see I misunderstood.

1 Like

Now we must wait for, good lucky for everyone.

1 Like

What about:

1 Like

Hi, I simply cannot get this theme component to work.

I have created the user field:

Installed the theme and configured it:

And the check never takes place?:

Any pointers would be great, thank you in advance.

2 Likes

Anything in the console? And just to make sure, you have tried clicking sign-up, right? I don’t know if the error appears on blur too, hence asking.

I am unable to reproduce this, it is working fine on latest-as-of-today.

Did you add the theme component to the right parent theme?

1 Like

Make sure your Discourse is up to date.

I could be wrong but that looks like it may be Mint theme in the sign up screenshot, while your theme setting page says it is Sam’s simple theme. like RGJ said, make sure you are adding it to the default theme that users will see when they sign up.

it will be the theme on the /admin/config/customize/themes page that says “default theme”

3 Likes

Thank you all,

I am unsure what caused this as I have just attempted it again and it is working… Must have been user error!!

I appreciate the fast responses, perhaps I could pick your brains a little more. I am interested in styling the calendar popup to align better with my theme, would anyone have any ideas on how to achieve this?

Thank you again!

2 Likes

Please open a new topic in Development for that instead.

3 Likes