Skip to Content Skip to Menu

Setting a field on user registration or renewal

  • petekuhn
  • petekuhn
  • OFFLINE
  • Posts: 239
  • Thanks: 34
  • Karma: 0
4 years 4 months ago #319069 by petekuhn
We're wanting to use the terms and condition field type to do just that. We would also like to set a constant into some field to record the exact version of the terms and conditions they agreed to. You record automatically that they have accepted and the date time stamp, but we want to add some constant data. Is there a way to do this?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48437
  • Thanks: 8275
  • Karma: 1443
4 years 4 months ago #319084 by krileon

but we want to add some constant data. Is there a way to do this?

You'd need to implement that yourself using CB Auto Actions acting on after user update trigger and checking if they accepted the terms field. I don't think it's really necessary though. If you update your terms and conditions simply run the below query on your database to reset the consent.

Code:
UPDATE `TABLE_PREFIX_comprofiler` SET `FIELD_NAMEconsent` = '0000-00-00 00:00:00'

Replace TABLE_PREFIX with whatever your database table prefix is. Replace FIELD_NAME with the name of your terms and conditions field. If it's the core terms and conditions field already provided by CB then replace FIELD_NAME with acceptedterms. So for example you might have the below.

Code:
UPDATE `jos_comprofiler` SET `acceptedtermsconsent` = '0000-00-00 00:00:00'

Have added a feature ticket to review adding a quicker and easier way to reset users consent.

forge.joomlapolis.com/issues/8043


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • petekuhn
  • petekuhn
  • OFFLINE
  • Posts: 239
  • Thanks: 34
  • Karma: 0
4 years 4 months ago #319099 by petekuhn
That makes sense if we want to do a reset. We were thinking of just recording the version number of the terms and conditions, and I guess Auto Actions could do that.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48437
  • Thanks: 8275
  • Karma: 1443
4 years 4 months ago #319112 by krileon
Why do you need to record the version number though? There's no reason to do that. You only need to record time of consent which it handles. If your terms and conditions change you are required to get consent again, which the above queries will force if you've require consent enabled in your CB system plugin. If you're in a country that doesn't require this (e.g. not subject to GDPR) then you still don't need version number.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum