Bugzilla – Attachment 192004 Details for
Bug 40744
Don't give noisy warning when PatronSelfRegistration is turned off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40744: Handle PatronSelfRegistration as well as PatronSelfRegistrationExpireTemporaryAccountsDelay
e69be63.patch (text/plain), 3.52 KB, created by
David Nind
on 2026-01-24 20:35:01 UTC
(
hide
)
Description:
Bug 40744: Handle PatronSelfRegistration as well as PatronSelfRegistrationExpireTemporaryAccountsDelay
Filename:
MIME Type:
Creator:
David Nind
Created:
2026-01-24 20:35:01 UTC
Size:
3.52 KB
patch
obsolete
>From e69be635e4a40306bc54f9fbef341ce003130330 Mon Sep 17 00:00:00 2001 >From: Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com> >Date: Thu, 22 Jan 2026 11:11:49 -0500 >Subject: [PATCH] Bug 40744: Handle PatronSelfRegistration as well as > PatronSelfRegistrationExpireTemporaryAccountsDelay > >Test plan > >BEFORE APPLYING PATCH: > >1- From the main page on the staff interface, go to Administration. >2- On the system preferences search bar, enter 'PatronSelfRegistration'. >3- Set 'PatronSelfRegistration' value to "Don't allow". >4- On the system preferences search bar, enter 'PatronSelfRegistrationExpireTemporaryAccountsDelay'. >5- Set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. >6- On command line, run cleanup_database.pl. >Note: the following message will show up: >'Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set' > >7- Apply patch. > >AFTER APPLYING PATCH: > >8- Set 'PatronSelfRegistration' value to "Don't allow" and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. >9- Save and run cleanup_database.pl : No message should show up. > >10- Set 'PatronSelfRegistration' value to "Allow" and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '0'. >11- Save and run cleanup_database.pl : No message should show up. > >12- Set 'PatronSelfRegistration' value to "Don't allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '1'. >13- Save and run cleanup_database.pl : No message should show up. > >14- Set 'PatronSelfRegistration' value to "Allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to '1'. >15- Save and run cleanup_database.pl >Note: this message should show up: >'Self-registrations cannot be removed, system preference PatronSelfRegistrationDefaultCategory is not set' > >16- Set 'PatronSelfRegistration' value to "Don't allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to ''(leave empty). >17- Save and run cleanup_database.pl : No message should show up. > >18- Set 'PatronSelfRegistration' value to "Allow". and set 'PatronSelfRegistrationExpireTemporaryAccountsDelay' value to ''(leave empty). >19- Save and run cleanup_database.pl : No message should show up. > >** EXEMPLE OF THE COMMAND TO EXECUTE: make sure to enter the RIGHT PATH to the script file. > >perl /path/to/cleanup_database.pl --sessions --sessdays 1 --zebraqueue 1 --mail 365 --merged --import 90 --z3950 --logs 180 --searchhistory 30 --list-invites 7 --all-restrictions --del-exp-selfreg --del-unv-selfreg 30 --temp-uploads --temp-uploads-days 14 --oauth-tokens --transfers 30 --jobs-days 1 --jobs-type all --confirm > >Signed-off-by: David Nind <david@davidnind.com> >--- > misc/cronjobs/cleanup_database.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl >index 2299e59cc5..14956ead72 100755 >--- a/misc/cronjobs/cleanup_database.pl >+++ b/misc/cronjobs/cleanup_database.pl >@@ -524,7 +524,7 @@ if ($verbose) { > say $confirm ? sprintf( "Deleted %d patrons", $count ) : sprintf( "%d patrons would have been deleted", $count ); > } > >-if ( $pExpSelfReg && C4::Context->preference('PatronSelfRegistration') ) { >+if ( $pExpSelfReg && C4::Context->preference('PatronSelfRegistration') && C4::Context->preference('PatronSelfRegistrationExpireTemporaryAccountsDelay')) { > try { > my $opac_registrations = Koha::Patrons->search->filter_by_expired_opac_registrations->filter_by_safe_to_delete; > my $count = $opac_registrations->count; >-- >2.39.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40744
:
191869
|
191874
|
191875
|
191876
|
191877
|
191886
|
191887
|
191888
|
191889
|
191933
|
191934
|
192003
| 192004