Skip to Content Skip to Menu

Remove user accounts older than 2 years with Auto Actions

  • peli_m
  • peli_m
  • OFFLINE
  • Posts: 54
  • Thanks: 6
  • Karma: 0
1 year 1 month ago #334891 by peli_m
Hello:

To accomplish with GDPR we need delete user account, profile, folder with documentation, avatar, etc from people with lastupdatedate older than 2 years, or people who never have logged in into the account.

I'm working in an Auto Action batch proccess triggered by a cron job:

- Global > Access: Registered.
-Action: Remove account (action to develope, see next paragraph).
- Advanced Filter > WHERE:
Code:
c.lastupdatedate = "0000-00-00 00:00:00" OR c.lastupdatedate < DATE_SUB(CURDATE(), INTERVAL -2 YEAR)

How I can develope the Remove account action? Maybe there are some programmatically substitution to do it? Or I must write a complex SQL action? I haven't found any system action to remove user profile in Auto Actions.

Thank you

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
1 year 1 month ago #334892 by krileon
I do not recommend automating deletions. 1 mistake and you just wiped your whole database of users. Please just do this manually once a year. You can filter CB > User Management by last visit date, registration date, and last update date as needed.

Additionally I recommend installing CB Privacy and letting users delete themselves whenever they like as it provides a delete account feature. This will provide them the right to erasure.


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.

  • peli_m
  • peli_m
  • OFFLINE
  • Posts: 54
  • Thanks: 6
  • Karma: 0
1 year 1 month ago #334894 by peli_m
Well, I agree but we need to block unoperative users  access once a month. An SQL Auto Action will change block field in user table. We'll do the users deletion as manual once a year more o less.

cb_privacy as you mention is installed and working like a charm some years ago. Some people use it, but lot of people simply let their account sleeping.

Thank you

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
1 year 1 month ago #334895 by krileon
If you just need to quickly toggle them to be blocked I suggest using a Query action and just writing an update query to do that. You shouldn't need to touch CBs tables only Joomla's _users table. You can then run that auto action on a schedule from CRON or using Joomla 4 schedule tasks component.


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