Bugzilla – Attachment 173894 Details for
Bug 25090
Moderate OPAC self registrations before a patron account is created
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.60 KB, created by
Aleisha Amohia
on 2024-11-04 02:20:42 UTC
(
hide
)
Description:
Bug 25090: Update PatronSelfRegistrationVerifyByEmail to include choices
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2024-11-04 02:20:42 UTC
Size:
5.60 KB
patch
obsolete
>From 0082853ce5a07528fde2074093cb949f320d354e Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Sun, 3 Nov 2024 23:53:03 +0000 >Subject: [PATCH] Bug 25090: Update PatronSelfRegistrationVerifyByEmail to > include choices > >This database update changes PatronSelfRegistrationVerifyByEmail from a YesNo preference to have these options: > >* don't require (same as 0 previously) >* patron verifies (same as 1 previously) >* library verifies, based on the EmailPatronRegistrations syspref setting > >Sponsored-by: Mental Health Education & Resource Centre >--- > ...atronSelfRegistrationVerifyByEmail_syspref.pl | 16 ++++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > .../prog/en/modules/admin/preferences/opac.pref | 9 ++++++--- > 3 files changed, 23 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 00000000000..1edd16b83c8 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_25090_-_update_PatronSelfRegistrationVerifyByEmail_syspref.pl >@@ -0,0 +1,16 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_failure say_success say_info); >+ >+return { >+ bug_number => "25090", >+ description => "Redirect self-registration verification email to the library", >+ 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 34ada9d8376..e9b1b1cca36 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -617,7 +617,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 1be562220e0..d79a6ba69ae 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 >@@ -791,12 +791,15 @@ OPAC: > - "library patrons to register for an account via the OPAC." > - "<br><strong>NOTE:</strong> This needs <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PatronSelfRegistrationDefaultCategory'>PatronSelfRegistrationDefaultCategory</a> to be set to a valid patron category code." > - >+ - "A self-registering patron" > - 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