Summary: | Unverified self registrations should be removed shortly | ||
---|---|---|---|
Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
Component: | Command-line Utilities | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | david, jonathan.druart, kyle |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This fixes the cleanup_database script so that the option to delete unverified self registrations (del-unv-selfreg) works. It also adds this option to the standard crontab, defaulting to 14 days (the default notice says unverified registrations will expire "shortly").
Note: If you don't use self registration with a verification email, this does not affect you. If you do use self registration, check the system preferences and settings - particularly PatronSelfRegistrationDefaultCategory.
|
|
Version(s) released in: |
22.05.00
|
Circulation function: | |
Attachments: |
Bug 28962: Add del-unv-selfreg to crontab
Bug 28962: Add del-unv-selfreg to crontab Bug 28962: Add del-unv-selfreg to crontab |
Description
Marcel de Rooy
2021-09-07 14:23:04 UTC
Ha, the advertized --del-unv-selfreg DAYS Delete unverified self registrations older than DAYS does not even work ! The cmdline value is silently ignored. Will fix that too now. Created attachment 124617 [details] [review] Bug 28962: Add del-unv-selfreg to crontab We also add a test by inserting a simulated borrower modification record in the same table which should not be deleted. NOTE: This patch fixes the del-unv-selfreg parameter in the cleanup db script. It did not even do what it promised :) Test plan: Verify if the crontab change is correct. Run t/db_dependent/Members.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> I have intentionally kept the BUG flag instead of ENH since this fixes a tiny but very sloppy bug in the cleanup_database parameter setting of this flag. Created attachment 128704 [details] [review] Bug 28962: Add del-unv-selfreg to crontab We also add a test by inserting a simulated borrower modification record in the same table which should not be deleted. NOTE: This patch fixes the del-unv-selfreg parameter in the cleanup db script. It did not even do what it promised :) Test plan: Verify if the crontab change is correct. Run t/db_dependent/Members.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> The crontab entry looks fine to me. The tests pass. No updates are required to the cron jobs and crontab sections of manual. The flag is already covered in the description of the script, although it doesn't work! (In reply to David Nind from comment #4) > Signed-off-by: David Nind <david@davidnind.com> Thx for your signoff's, David ! Not a big deal I think, but prior to this patch we were actually removing faster as the "default" was 1. Also note that with this patch the script will now fail (displaying the help) if the flag is called without value. I don't think we should backport this. Created attachment 129377 [details] [review] Bug 28962: Add del-unv-selfreg to crontab We also add a test by inserting a simulated borrower modification record in the same table which should not be deleted. NOTE: This patch fixes the del-unv-selfreg parameter in the cleanup db script. It did not even do what it promised :) Test plan: Verify if the crontab change is correct. Run t/db_dependent/Members.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (In reply to Jonathan Druart from comment #7) > Not a big deal I think, but prior to this patch we were actually removing > faster as the "default" was 1. This is arguable. First, saying that "default" is 1 leans on the true value (not a great feature). But more importantly, the crontab did not include this flag. So unless an admin added it, the records were not deleted at all. (In reply to Jonathan Druart from comment #8) > Also note that with this patch the script will now fail (displaying the > help) if the flag is called without value. I don't think we should backport > this. Agreed. Moving to enh. (Altough it fixes a bug..) Pushed to master for 22.05, thanks to everybody involved [U+1F984] |