- Posts: 85
- Thank you received: 3
Purge old registrants and their attached files?
- Robert Gastaud
- Topic Author
- Offline
- Premium Member
-
Less
More
3 years 7 months ago #146501
by Robert Gastaud
Purge old registrants and their attached files? was created by Robert Gastaud
Hi,
Is it a simple way to purge the registrants and their attached files using a limit date (1 or more month)?
Thanks for your reply!
Robert
Is it a simple way to purge the registrants and their attached files using a limit date (1 or more month)?
Thanks for your reply!
Robert
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
3 years 7 months ago #146506
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Purge old registrants and their attached files?
Hello Robert
We do not support that option at the moment. Something we can try to support for in the future
Regards,
Tuan
We do not support that option at the moment. Something we can try to support for in the future
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Robert Gastaud
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 85
- Thank you received: 3
3 years 7 months ago #146508
by Robert Gastaud
Replied by Robert Gastaud on topic Purge old registrants and their attached files?
Thanks Tuan!
Best regards,
Robert
Best regards,
Robert
Please Log in or Create an account to join the conversation.
- Robert Gastaud
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 85
- Thank you received: 3
3 years 5 months ago - 3 years 5 months ago #147705
by Robert Gastaud
Replied by Robert Gastaud on topic Purge old registrants and their attached files?
Hi Tuan,
I created a (raw) plugin to delete oldest events, their registrants and the attachments of these registrants.
The params are the time period between two purges, the period we keep the data, the path of the attachments, an option to define the internal name of the attachments custom field, a debug option and a "lastrun" hidden field.
It works but I'm using "onAfterRender" to execute the code, so it's too often triggered.
Is it a trigger in Event Booking I could use instead of "onAfterRender" ?
Thanks for your help!
Regards,
Robert
PS: it's a "system" plugin
I created a (raw) plugin to delete oldest events, their registrants and the attachments of these registrants.
The params are the time period between two purges, the period we keep the data, the path of the attachments, an option to define the internal name of the attachments custom field, a debug option and a "lastrun" hidden field.
It works but I'm using "onAfterRender" to execute the code, so it's too often triggered.
Is it a trigger in Event Booking I could use instead of "onAfterRender" ?
Thanks for your help!
Regards,
Robert
PS: it's a "system" plugin
Last edit: 3 years 5 months ago by Robert Gastaud.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
3 years 5 months ago #147711
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Purge old registrants and their attached files?
Hello Robert
There is no trigger in Events Booking which you can use. You should add a parameter such as Cache Time (same as in Events Booking -> Reminder Plugins) to control how often the plugin should run. I think it should only run once per week (or if it is needed, once per day). It should not be run so often
Tuan
There is no trigger in Events Booking which you can use. You should add a parameter such as Cache Time (same as in Events Booking -> Reminder Plugins) to control how often the plugin should run. I think it should only run once per week (or if it is needed, once per day). It should not be run so often
Tuan
Please Log in or Create an account to join the conversation.
- Robert Gastaud
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 85
- Thank you received: 3
3 years 5 months ago #147730
by Robert Gastaud
Replied by Robert Gastaud on topic Purge old registrants and their attached files?
Thanks Tuan for your reply.
I'm yet using an option to run the cod only every x days, so the code to purge is not executed if the delay (2 or 3 weeks) is not reached.
Each time the plugin is triggered (for each page change in frontend for example) I get the params and I compare the actuel time, the lastrun time and the delay param and return if the delay is greater than the difference between these two times, otherwise I run the code. So it's what you are advising me.
But as I'm not a coder, so I would like to find a trigger which triggers the plugin much less often than "onAfterRender".
Regards,
Robert
I'm yet using an option to run the cod only every x days, so the code to purge is not executed if the delay (2 or 3 weeks) is not reached.
Each time the plugin is triggered (for each page change in frontend for example) I get the params and I compare the actuel time, the lastrun time and the delay param and return if the delay is greater than the difference between these two times, otherwise I run the code. So it's what you are advising me.
But as I'm not a coder, so I would like to find a trigger which triggers the plugin much less often than "onAfterRender".
Regards,
Robert
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
3 years 5 months ago #147731
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Purge old registrants and their attached files?
Hello Robert
You can use other event trigger like :
- onAfterSaveEvent : Trigger when an event is stored
- onAfterStoreRegistrant : Triggered when a registration record is created and stored in database
- onAfterPaymentSuccess : Triggered when a registration is marked as paid (for example, when someone completes payment for a registration)
- onEventDisplay : Triggered when an event is being displayed on event details page
These are events for Events Booking
Regards,
Tuan
You can use other event trigger like :
- onAfterSaveEvent : Trigger when an event is stored
- onAfterStoreRegistrant : Triggered when a registration record is created and stored in database
- onAfterPaymentSuccess : Triggered when a registration is marked as paid (for example, when someone completes payment for a registration)
- onEventDisplay : Triggered when an event is being displayed on event details page
These are events for Events Booking
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Robert Gastaud
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 85
- Thank you received: 3
3 years 5 months ago #147732
by Robert Gastaud
Replied by Robert Gastaud on topic Purge old registrants and their attached files?
Thanks Tuan,
I will try with them.
Best regards,
Robert
I will try with them.
Best regards,
Robert
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
3 years 5 months ago #147733
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Purge old registrants and their attached files?
OK Robert. You can look at the plugins for Events Booking (in plugins/eventbooking folder) to see how we handle these events in the extension
Regards,
Tuan
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Robert Gastaud
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 85
- Thank you received: 3
3 years 5 months ago #147734
by Robert Gastaud
Replied by Robert Gastaud on topic Purge old registrants and their attached files?
Thank you Tuan!
I am very grateful for all your advice
Regards,
Robert
I am very grateful for all your advice
Regards,
Robert
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.