Inactive User Cleanup

Administration tools ::: tool_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.
Latest release:
312 sites
174 downloads
62 fans
Current versions available: 6

Automate the process of removing inactive users from your site using Inactive User Cleanup. Each inactive user will receive a customized email as per predefined inactivity dates before account deletion.

Note: The cleanup process is run by the Moodle cron, so while Moodle removes the clutter, this solution cleans up the inactive learners for your courses.  

  • Add Interval Time - You can set an interval time for your students before thay get automatically removed during the cleanup. Learners will receive an email requesting the deletion of their accounts if the interval time exceeds the limit you've set. 

  • Check and Assess Timestamp - An interesting feature of this solution is that is compares the last activity time with the present time. The deletion process begins if the interval between the two timestamps is longer than what has been set. 

  • Send Notification Email - Another unqiue feature of this solution is that that whenever before deleting an inactive accounts students get notifies about the deletion process. This gives them the opportunity to reactivate their account. 

  • Hassle-Free Cleanup - This is such a simple and easy solution, you can avoid having to manually go through and delete each account.

Try out this efforless way of cleaning up your inactive users. 



Screenshots

Screenshot #0

Contributors

DualCube Team (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments

Ukázat komentáře
  • Becka M
    pátek, 20. září 2024, 04.47
    This would save me so much time with maintenance... BUT I have a question. Is there an option, or can one be created, where one can list users to *never* be removed from the system?

    For example, part of our school policy is if you get caught plagiarizing, or you accumulate and max out the set number of demerits/marks (scoring system for rule-breaking), or are excessively hostile to school staff, you're suspended for a certain length of time based on the severity of the infractions. (And would be outside the timeframe I use to remove inactive users.)

    And, we have a few accounts that only get used periodically (often outside of the timeframe I use for manually removing idle users), plus a couple I use as "sample" students for testing features and making tweaks.

    I DO NOT want those to ever get deleted. So this would be great, if there were a way to say "exclude these users from the deletion process." Is that doable? Or in the works?

    Like I said, this would save me so much work in the user maintenance "department", and I wouldn't have to mess with csv files with user data (and "shredding" it later) like I'm currently doing.
  • DualCube Team
    pátek, 20. září 2024, 19.55
    Hi Becka, thank you for your query!

    To ensure you receive the best assistance, I kindly recommend reaching out to our development team directly via this link:https://dualcube.com/contact-us/. They will be able to provide you with more detailed support.
  • Mark Baldwin
    středa, 16. října 2024, 21.14
    Hi - thank you for the response. I downloaded the latest version via GitHub (2.7.4) but this was the same as the previous download with the issue still occuring.
  • DualCube Team
    čtvrtek, 17. října 2024, 14.00
    Hi Mark,

    Please ensure you're using the latest version from GitHub, as there doesn't seem to be an error at that line. I recommend uninstalling your current version, installing the updated one from GitHub, and checking again.

    Let us know how it goes.
  • seaghan moriarty
    středa, 29. ledna 2025, 03.04
    My Moodle is 4.1.14 with PHP 8.1.31 and max_input_vars = 5000
    2.7.2 2.7.4 and 2.7.5 are all apparently compatible with my Moodle 4.1
    However, when I try 2.7.5 (and the Githib master version), I see:

    Plugin Version: 2025010900
    Required Moodle version: 2022112815
    Installation Aborted due to validation failure

    My Question: Should I try 2.7.4 or 2.7.2 - which will work for me?
    Thank you for any guidance you can give.
  • DualCube Team
    středa, 29. ledna 2025, 14.20
    Hello Seaghan, you are using Moodle 4.1.14

    In order to use the latest version of Inactive User , you need to use Moodle version 4.1.15 . So kindly update Moodle and then update the plugin.
    Please do keep us posted.
  • seaghan moriarty
    středa, 29. ledna 2025, 23.46
    OK excellent! I will update to 4.1.15 and use the 2.7.5 version - thank you!
  • Jean-Gabriel DEPINOY
    čtvrtek, 3. dubna 2025, 14.36
    Hi,
    My version of Moodle is 4.5.3 with PHP 8.1
    Each day, I can see in my log file the same message "PHP Warning: Attempt to read property "date" on bool in /public_html/moodle/admin/tool/inactive_user_cleanup/classes/task/tool_inactive_user_cleanup_task.php on line 79"" more than 100 times.
    Thanks in advance
  • DualCube Team
    čtvrtek, 22. května 2025, 20.31
    @Jean-Gabriel, we have released an update with 5.0 update and the fix for this error.
    Kindly update the plugin and check.
  • Thomas Siermann
    pátek, 29. srpna 2025, 13.03
    Hi,
    we have a problem with your tool.
    The settings are 2555 days for inactive days and 1 day for send e-amil for user tests.
    The cron-job runs with In the last cron-job 0 users were archived.
    In the last cron-job 0 users were deleted.
    In the last cron-job 0 users were reactivated.

    No problems occurred in plugin tool_cleanupusers in the last run.

    However, users who have not logged in for more than 7 days will not be deleted.
    Can you help us, please.
  • DualCube Team
    sobota, 30. srpna 2025, 21.43
    Hello Thomas,

    We checked the plugin configuration and the reason users are not being deleted after 7 days is due to the current settings:

    Days of inactivity: 365

    Days before deletion: 10

    With this setup, a user is only marked as inactive after 365 days without login. After that, they are deleted 10 days later (on day 375).
    This means users inactive for just 7 days will not be affected.

    If you want users to be deleted after 7 days of inactivity, please update the settings as follows:

    Days of inactivity: 7

    Days before deletion: 1 (or adjust as needed)

    This way, users will be considered inactive after 7 days, and then deleted the following day.
  • Jarrod Miles
    úterý, 28. října 2025, 17.18
    Hi there. I'm using 4.7.2, and it's been working great for a while now. However, came into a weird issue.

    Settings:
    Days of inactivity: 730
    Days Before Deletion: 15

    Checking mail logs on the server, a student was sent an email on 2025-10-11 08:59:02 titled "Your account is about to be deleted".
    At 2025-10-15 04:09:35 (4 days later), the student logged in and received the email titled "New sign in to your ***** account". At this point, this should be considered activity, and the account should no longer be flagged for deletion, right?
    On 2025-10-27 09:59:XX, the student received a dozen emails unenrolling them from each course.
    Finally, 2025-10-27 09:59:49, the student received their last email titled "User Account Deleted".

    My question is, why? I don't have a record of what courses they were in, and it also deleted them from our SSO WordPress site, thus deleting their orders to check their history.

    Thanks in advance!
    Jarrod.
  • DualCube Team
    pondělí, 3. listopadu 2025, 02.28
    Hi All,

    We’ve added the necessary fixes and prepared a beta version for you to test.
    You can download it from the link below: https://drive.google.com/file/d/16F5mjE92S0VZYErMCB1oTtmQQ9Kl6_-A/view?usp=drive_link

    Please install and test it on your setup, and let us know if everything works as expected.

    Thank you for your continuous support and valuable feedback — it really helps us improve the plugin.
  • Matthias Kolbe
    středa, 17. prosince 2025, 14.43
    Testing the plugin tool_inactive_user_cleanup

    I used the beta version via the provided link, as the official version did not deliver the desired result in my case. Using the beta version, the email was successfully sent to the affected users, and the accounts were deleted.

    I have some additional suggestions that would help a lot:
    - Is it be possible to generate placeholders for the email in order to address users directly (first name and last name)? Additional placeholders for the automated email might also be useful.
    - Based on my tests, users who have never logged into the platform are not included and remain unaffected. An additional feature might be helpful to allow inclusion of users who have never logged into the platform.

    Thanks a lot
    Matthias
  • DualCube Team
    středa, 17. prosince 2025, 22.19
    Hello Matthias,

    Great to hear that the beta version is working well for you and that it achieved the desired results. Thank you for testing it and sharing your feedback - it’s truly appreciated. We’ll be releasing this update officially very soon.

    Regarding users who have never logged in, we agree that this is a valuable use case. We’ll plan to include support for this in a future update. For now, you can track the progress of this enhancement here:
    https://github.com/dualcube/moodle-tool_inactive_user_cleanup/issues/38

    For your first request about email placeholders, could you please explain the flow you have in mind in a bit more detail? If possible, we’d recommend opening a GitHub request where you can describe the expected behavior and, if needed, attach screenshots or images to help us better understand your requirements.

    Thanks again for your helpful suggestions and for taking the time to test the beta.
1 2 3 4 5 6
Please login to post comments