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.
Comments
Product ratings and reviews are coming to Moodle Marketplace. Until then, existing comments remain available to read, but new posts have been disabled.
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
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
Thanks for your valuable suggestion. We will surely add this to our next version upgrade.
Best Regards,
Arindam
Team Dualcube
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
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.
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
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
Thanks for the approval!! We are working onthe suggested changes/modifications and will publish that in the next version.
Thanks and Regards,
Arindam
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_formand not the currentadmin_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.
We have incorporated the requested changes. Please check and let me know.
Thanks and Regards,
Arindam
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.