Date Type On Custom User Fields

Hi,

i wanto to add date picker named with birthday on signup ,
but in customize->user fields part 3 input tpyes

how can i add datepicker to signup part?

Best Regards

7 Likes

Bump …

Any reason why you can’t choose a Date Type for User Custom Fields? This would be useful for one of my forums, and not just for birthdays …

I’m aware of this plug-in but it seems it only handles birthday entry? what about other anniversaries or fixed dates?

2 Likes

Guys, I was thinking of forking cake day for my own purposes but I’d much rather dates were allowed for custom user fields, any reason why not? Wouldn’t thIs be a relatively small change to core?

2 Likes

Another bump for this one given we appear to have just iterated to a new release phase :wink:

3 Likes

I would like to use the birthdate for an age verification.

4 Likes

Bump, 3 questions

  • Why can’t we add a date type on customer user field. Please add that functionality.
    My use case is also to verify age of community members during sign-up.

  • Also is there a way where cake day is customizable to include birth year?

  • Want to make some user fields in profile compulsory to be filled up post sign up

2 Likes

Did this get any traction. I’d like to verify ages via DOB

2 Likes

Yeah I need age verification as well - it’s the major reason we haven’t made the migration yet.

It seems like the take from the core developers is “you have no way of verifying your users are being honest” - I am well aware of that argument, but let me as a responsible site owner deal with that.

So for now I’ll have to have the users go through the manual task of PM’ing staff stating they are > 15 / 18 years old to gain access to the restriceted categories.

Once I get some more time i’ll need to work on a plugin.

2 Likes

There is a basic form of verification at signup here, where at the bottom it says

By registering you agree to the privacy policy and terms of service.

You could easily edit that text (as you can edit any text in Discourse) to say something like

By registering you confirm that you are at least 13 years of age, and agree to the privacy policy and terms of service.

3 Likes

Thanks Jeff, I realize I was not accurate enough in my reply.

We need to be able to distinguish users based on age and sort them into groups. The reason is we have a category only for people > 15 years (seeking contact), several only for people > 18 years (adult / sexual themed) and even one only for people < 20 years (trusted space for the minors avoid predators & creeps).

I am in the process of migrating from a site based on Joomla (using Kunena, K2, Cobalt and JomSocial components) to a new much simpler site only based on Discourse (I’ll make a PR with my import scripts once I’m done and have had time to document them).

Currently we solve it by having groups users can join, and then have a SQL script running every 5 mins which remove and notify admin if someone joins a group they are not supposed to join.

In the current setup with Discourse I’m designing, I’ve made a JS date picker solution on their profile and for a start the current users are added to groups during the import. New users will be a manual task until I have time to write a Sidekiq job to manage that. We do seldom get more than 5 new users per week so it is manageable.

I do realize I have no way of knowing if a user is telling the truth on their age, but we have been running the community like that for 20 years now, including dealing with Danish law enforcement which did state we did the right thing.

We generally promote telling the truth, rather than restricting access, so that we may communicate with the younger at an appropriate level and be ready to protect them rather than shun them away or have them lie about their age to gain access.

Age of consent is 15 in Denmark, legal of age is 18. There is really no age limit for access to porn according to the laws. We do as a community keep hardcore subjects and sexual images for > 18 year old to avoid all the high waved discussions :fire: that otherwise arises every other year.

During the migration I am rewriting the rule set and I will definitely also including a clear statement that if you are < 13 years you need to have your parents permissions to create the profile (trust me, none of our users will ever ask their parent for permission :grin:)

1 Like

I see – you’ll need to use category security to segregate these groups.

As far as proof of age, you may need legal proof, which would require a picture of their official government ID, yes?

As far as proof of age, you may need legal proof, which would require a picture of their official government ID, yes?

If we were a business and thus generating income it would be a way to go yes (we have official digital signatures). Any other way would be a nightmare with the GDPR.

Anyway this community is non-commercial and legally we are not obligated by law to do any verification. Europe in general, Denmark more so is a bit more relaxed when it comes to adult material compared to US. Std. disclaimer: I am in no way legal expert, any reader is strongly advised to seek professional legal counseling :slight_smile:

2 Likes

This would be very useful for demographic analysis. On one of our sites we collect “Age Band” by decade for this purpose, which is a bit silly as it degrades by 10% in accuracy per year! We probably should have collected year (or decade) of birth instead but hey, hindsight is 20/20.

It would be nice if DOB was baked into an official plugin like Cakeday, as long as the field was reachable by Polls Breakdown. As a configurable option of course in order to cater for those forums where privacy is rated more highly.

2 Likes

As challenge to myself (of learning some ruby), I have tried to add some code to the awesome cakeday plugin, that takes privacy and security into account whilst adhearing to existing coding conventions and my own ability thereof.

The code can be seen at https://github.com/DaVania/discourse-cakeday/commits/discourse-cakeday_with-age

I do hope :pray: it will be of use, and since this is my first use of Github as an contributor, I suspect that not everything is perfect, even though my efforts through many nights and months to make it just that. (Perfect)

2 Likes

I’ll pile on here. I’m working with a community that it working toward an age-based life goal, so it’s important that they get an age (they are willing to pretend that whatever age is entered is accurate).

It looks like this might be a solution: Datepicker in a custom User field - #5 by tshenry

But adding a user_custom_field date type would be much easier. I’m surprised no Enterprise people have wanted this. It doesn’t seem like it’d be that hard to add to core. You can already use DateTimeInputRange in handlebars, so it should be pretty simple to add it over on the Rails side too.

2 Likes