Inactive User Cleanup icon

Inactive User Cleanup

Maintained by DualCube Team
The inactive user cleanup is a useful solution that deletes an inactive user's account automatically. Additionally, the solution sends users emails informing them before deleting their account. Thus, if a learner logs in before the account is deleted, he or she will not be removed from the system.
Price option: Free

Supports Moodle 2.4-5.0 See all versions
Latest release: 1 year ago
Installations: 329
Downloads (last 90 days): 125

Frankenstyle name: tool_inactive_user_cleanup
Administration tools

Comments

Product ratings and reviews are coming to Moodle Marketplace. Until then, existing comments remain available to read, but new posts have been disabled.

Hi Tobias,
Sorry to know about your problem. Though we could not replicate this problem, we published an update today with some modifications which should take care of any such issues. Please check with this latest version and let me know if the issue is solved.
Looking forward to your response.
Thanks and Regards,
Arindam
Hi DualCube Team,
after installing your plugin our Moodle site was unrechable. There has been just the promt: "Sie besitzen derzeit keine Rechte, dies zu tun (Nutzer/innen löschen)."
Did you ever have this phenomenon?
After deleting the plugin everythings works again.
Best regards
Tobias
Hi Mark,
Thanks for your valuable suggestion. We will surely add this to our next version upgrade.
Best Regards,
Arindam
Team Dualcube
It would be really helpful if you could add the option to suspend the account instead of deleting it from the database.
Hi Rob,
Thanks for reaching out to us! We have uploaded a new version. Kindly check and confirm that its working fine now.
Please do let me know if you still face any problem.
Thanks and Regards,
Arindam
Hi
Just downloaded and installed this tool setup to remove accounts older then 300 days. But its sent emails to random accounts some only 12 days since last activity. Removed the tool before it deletes accounts.
Hi Olaf,
Thanks for reaching out to us. Please find our responses below.
a) The plugin seems to loose it's settings (notify time, delete time, email
text)
Ans:- We have checked, but the settings are being saved. Can you please once again by uninstalling and re-installing the plugin? Please confirm.
b) it seems that the plugin does not remember who has been send a mail to
already! My cron job is running every 15 minutes - all users who met the
critera received an email every 15 minutes (and not only once - as it should
-probably- be)
Ans:- Unfortunately, currently there is no settings available for remembering the user who have already been sent email . We will be happy to update it in our next version.
Please let me know if you face any more issues.
Best Regards,
Arindam
Team DualCube
Hi
the idea is great.. but (as today, 2014-11-19):
I installed in Moodle 2.7.
a) The plugin seems to loose it's settings (notify time, delete time, email text).
b) it seems that the plugin does not remember who has been send a mail to already! My cron job is running every 15 minutes - all users who met the critera received an email every 15 minutes (and not only once - as it should -probably- be)!
Olaf
Hi David,
Thanks for the approval!! We are working onthe suggested changes/modifications and will publish that in the next version.
Thanks and Regards,
Arindam
Thanks for providing the updated version. I can see you have decided to implement a custom moodleform to configure the plugin. In fact, you could have used the standard settings API to process the whole form for you (which would also make the settings searchable from the admin block etc). Please see how other plugins use the settings.php file.
In any way, the name of the form class should follow the naming rules and have proper frankenstyle prefix (such as tool_inactive_user_cleanup_config_form and not the current admin_email_form).
I am going to approve the plugin now with the hope this would be addressed yet in a future update. Said that, you are cleared to land. Welcome to the Plugins directory.
Hi David,
We have incorporated the requested changes. Please check and let me know.
Thanks and Regards,
Arindam
Thanks for sharing this tool with the community. This is a step forward from the previous version submitted as block_inactive_user_cleanup. However, there are two aspects of the code I conceptually disagree with. One of them has significant impact on the site performance, especially if many users are registered. As I can imagine it's big sites that would like to profit from your tool most, I must consider it as an approval blocker for now. Particularly:
1. As far as I can understand, the tool_inactive_user_cleanup table is supposed to hold the configuration for your tool. Then you have unnecessary amount of code that deals with eventual multiple records in this table. I am finding this very confusing. Let me suggest to drop that table completely (i.e. do not create it at all) and store all the setting into the config_plugins table using the set_config() and get_config() API. I believe this will lead to much simpler and easier to understand code.
2. In your tool_inactive_user_cleanup_cron() you read all users and all their data into memory via $users = $DB->get_records('user'); and then iterate through the loop to decide on inactivity. That is very bad for many reasons. a) It's better to use $DB->get_recordset() here, b) you should not load table fields you do not need, c) You should perform the comparison at the database level using the WHERE statement so that only required info for inactive users would be returned from the database, d) please note you repeat the html_to_text() call for every student for no reason - this can return still the same result millions times in a row.
For now, I am going to mark this plugin as needing more work until we get these issues resolved. Thanks for your patience with the review and approval process.