Bugzilla – Attachment 183266 Details for
Bug 25090
Moderate OPAC self-registrations before a patron account is activated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25090: Update PatronSelfRegistrationVerifyByEmail to include choices
Bug-25090-Update-PatronSelfRegistrationVerifyByEma.patch (text/plain), 5.01 KB, created by
David Nind
on 2025-06-15 23:56:26 UTC
(
hide
)
Description:
Bug 25090: Update PatronSelfRegistrationVerifyByEmail to include choices
Filename:
MIME Type:
Creator:
David Nind
Created:
2025-06-15 23:56:26 UTC
Size:
5.01 KB
patch
obsolete
>From aaab3361b2a6d8d9218ba4e42f73296c57b74d72 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleisha@catalyst.net.nz> >Date: Wed, 4 Jun 2025 23:04:27 +0000 >Subject: [PATCH] Bug 25090: Update PatronSelfRegistrationVerifyByEmail to > include choices > >Signed-off-by: David Nind <david@davidnind.com> >--- > ...onSelfRegistrationVerifyByEmail_syspref.pl | 20 +++++++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > .../en/modules/admin/preferences/opac.pref | 8 +++++--- > 3 files changed, 26 insertions(+), 4 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_25090_-_update_PatronSelfRegistrationVerifyByEmail_syspref.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_25090_-_update_PatronSelfRegistrationVerifyByEmail_syspref.pl b/installer/data/mysql/atomicupdate/bug_25090_-_update_PatronSelfRegistrationVerifyByEmail_syspref.pl >new file mode 100755 >index 0000000000..73bcec962a >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_25090_-_update_PatronSelfRegistrationVerifyByEmail_syspref.pl >@@ -0,0 +1,20 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "25090", >+ description => "Moderate OPAC self registrations before a patron account is created", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do( >+ q{UPDATE systempreferences SET value = "off", options = "off|patron|library", type = "Choice" WHERE variable = "PatronSelfRegistrationVerifyByEmail" and value = "0"} >+ ); >+ $dbh->do( >+ q{UPDATE systempreferences SET value = "patron", options = "off|patron|library", type = "Choice" WHERE variable = "PatronSelfRegistrationVerifyByEmail" and value = "1"} >+ ); >+ >+ say_success( $out, "Updated system preference 'PatronSelfRegistrationVerifyByEmail' to include choices" ); >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 09b8afd6fd..22da426cb3 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -635,7 +635,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('PatronSelfRegistrationExpireTemporaryAccountsDelay','0',NULL,'If PatronSelfRegistrationDefaultCategory is enabled, this system preference controls how long a patron can have a temporary status before the account is deleted automatically. It is an integer value representing a number of days to wait before deleting a temporary patron account. Setting it to 0 disables the deleting of temporary accounts.','Integer'), > ('PatronSelfRegistrationLibraryList','',NULL,'Only display libraries listed. If empty, all libraries are displayed.','Free'), > ('PatronSelfRegistrationPrefillForm','1',NULL,'Display password and prefill login form after a patron has self-registered','YesNo'), >-('PatronSelfRegistrationVerifyByEmail','0',NULL,'If enabled, any patron attempting to register themselves via the OPAC will be required to verify themselves via email to activate their account.','YesNo'), >+('PatronSelfRegistrationVerifyByEmail','off','off|patron|library','If enabled, any patron attempting to register themselves via the OPAC will require self-verification or library verification via email to activate their account.','Choice'), > ('PatronsPerPage','20','20','Number of Patrons Per Page displayed by default','Integer'), > ('PhoneNotification','0',NULL,'If ON, enables generation of phone notifications to be sent by plugins','YesNo'), > ('PlaceHoldsOnOrdersFromSuggestions','0',NULL,'If ON, enables generation of holds when orders are placed from suggestions','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index 5441fd7e11..8b0aeb6f44 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -833,10 +833,12 @@ OPAC: > - > - pref: PatronSelfRegistrationVerifyByEmail > choices: >- 1: Require >- 0: "Don't require" >- - "that a self-registering patron verify themselves via email." >+ patron: "must verify themselves via email" >+ library: "must be verified via email sent to EmailPatronRegistrations" >+ off: "is not required to verify themselves" >+ - "to activate their account." > - "<br><strong>NOTE:</strong> This system preference requires the <code>misc/cronjobs/cleanup_database.pl</code> cronjob. Ask your system administrator to schedule it." >+ - "<br><strong>NOTE:</strong> Ensure the <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=EmailPatronRegistrations'>EmailPatronRegistrations</a> system preference is set if you choose that verification option." > - > - "Use" > - pref: PatronSelfRegistrationDefaultCategory >-- >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 25090
:
102845
|
103535
|
103536
|
104380
|
104381
|
104382
|
104383
|
104386
|
104994
|
104996
|
105319
|
112493
|
112494
|
112495
|
112496
|
112497
|
173894
|
173895
|
173896
|
173897
|
173898
|
173899
|
173962
|
173963
|
173964
|
174228
|
174229
|
174230
|
182963
|
182964
|
182965
|
182966
| 183266 |
183267
|
183268
|
183269