Skip to Content Skip to Menu

Filtering by date of acceptance of Terms and conditions

  • AlecsRU
  • AlecsRU
  • OFFLINE
  • Posts: 111
  • Thanks: 3
  • Karma: 0
4 years 11 months ago #315040 by AlecsRU
Good afternoon, tell me the solution to the problem. I have users get a new level of access after downloading data and checking the terms and conditions.

It takes a very long time to unload the components, too much extra data has to be pumped out. It would be easier to unload only those who ticked in October, rather than all those with access. But there is no filtering by accept date. I even tried to make a list, but there is also no filtering by date, only the presence of a mark.

Tried third-party extensions, they also do not take into account the accept date.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48438
  • Thanks: 8275
  • Karma: 1443
4 years 11 months ago #315048 by krileon
I assume you're wanting to filter a userlist and not CB > User Management? For a userlist you'd use an Advanced filter. This allows you to directly add to the WHERE statement of the userlist query. Terms and Condition fields store their acceptance date in a FIELD_NAMEconsent column. This means for the core terms and conditions field the date is stored in acceptedtermsconsent column. You can filter against that in your userlist. Example as follows.

Code:
ue.`acceptedtermsconsent` >= DATE_SUB( NOW(), INTERVAL 1 MONTH )

That should display everyone who accepted the terms in the last month from today. the "ue" table alias is for _comprofiler while "u" table alias is for _users. See the below MYSQL documentation for further date usage information in SQL.

dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html


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