Bugzilla – Attachment 104381 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: Add 2 new sysprefs allowing libraries to approve OPAC registrations
Bug-25090-Add-2-new-sysprefs-allowing-libraries-to.patch (text/plain), 6.98 KB, created by
Alex Buckley
on 2020-05-05 21:28:21 UTC
(
hide
)
Description:
Bug 25090: Add 2 new sysprefs allowing libraries to approve OPAC registrations
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2020-05-05 21:28:21 UTC
Size:
6.98 KB
patch
obsolete
>From 126da7d621005e77d252d4c21e3153eb39b391a6 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Tue, 5 May 2020 09:07:56 +0000 >Subject: [PATCH] Bug 25090: Add 2 new sysprefs allowing libraries to approve > OPAC registrations > >Added: >* PatronSelfRegistrationVerifyByEmailToLibrary - Default value = 'None' >* PatronSelfRegistrationVerifyByEmailToPatron - Default value = "Don't >require" > >Removed: >* PatronSelfRegistrationVerifyByEmail > >For existing Koha installs if removed >PatronSelfRegistrationVerifyByEmail was enabled then >PatronSelfRegistrationVerifyByEmailToPatron is enabled - they have the >same behaviour when enabled. > >Sponsored-By: Mental Health Education Resource Centre, NZ >--- > ...fRegistrationVerifyByEmailToPatron_sysprefs.perl | 21 +++++++++++++++++++++ > installer/data/mysql/sysprefs.sql | 3 ++- > .../prog/en/modules/admin/preferences/opac.pref | 13 +++++++++++-- > 3 files changed, 34 insertions(+), 3 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_25090-add_PatronSelfRegistrationVerifyByEmailToLibrary_and_PatronSelfRegistrationVerifyByEmailToPatron_sysprefs.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_25090-add_PatronSelfRegistrationVerifyByEmailToLibrary_and_PatronSelfRegistrationVerifyByEmailToPatron_sysprefs.perl b/installer/data/mysql/atomicupdate/bug_25090-add_PatronSelfRegistrationVerifyByEmailToLibrary_and_PatronSelfRegistrationVerifyByEmailToPatron_sysprefs.perl >new file mode 100644 >index 0000000000..f10c26bd40 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_25090-add_PatronSelfRegistrationVerifyByEmailToLibrary_and_PatronSelfRegistrationVerifyByEmailToPatron_sysprefs.perl >@@ -0,0 +1,21 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ my $sth = $dbh->prepare("SELECT value from systempreferences WHERE variable='PatronSelfRegistrationVerifyByEmail'"); >+ $sth->execute; >+ my ($value) = $sth->fetchrow; >+ >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('PatronSelfRegistrationVerifyByEmailToPatron', '$value', NULL, 'If enabled, any patron attempting to register themselves via the OPAC will will receieve an email requiring him or her to verify themselves via email to activate their account', 'YesNo'); >+ }); >+ >+ $dbh->do(q{ >+ DELETE FROM systempreferences WHERE variable='PatronSelfRegistrationVerifyByEmail'; >+ }); >+ >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('PatronSelfRegistrationVerifyByEmailToLibrary', '0', '0|BranchEmailAddress|KohaAdminEmailAddress', 'If enabled, when a patron attempts to register themselves via the OPAC a verification email will be sent to the library to approve the activation of the patron account.', 'Choice'); >+ }); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 25090 - Add two new sysprefs PatronSelfRegistrationVerifyByEmailToPatron and PatronSelfRegistrationVerifyByEmailToLibrary so libraries have option to moderate which registrations get Koha accounts)\n"; >+} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 5bcc474ddf..abc3514970 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -496,7 +496,8 @@ 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 his or her account.','YesNo'), >+('PatronSelfRegistrationVerifyByEmailToLibrary', '0', '0|BranchEmailAddress|KohaAdminEmailAddress', 'If enabled, when a patron attempts to register themselves via the OPAC a verification email will be sent to the library to approve the activation of the patron account.', 'Choice'), >+('PatronSelfRegistrationVerifyByEmailToPatron','0',NULL,'If enabled, any patron attempting to register themselves via the OPAC will will receieve an email requiring him or her to verify themselves via email to activate their account','YesNo'), > ('PatronsPerPage','20','20','Number of Patrons Per Page displayed by default','Integer'), > ('EnablePayPalOpacPayments', '0', NULL , 'Enables the ability to pay fees and fines from the OPAC via PayPal', 'YesNo' ), > ('PatronQuickAddFields', '', NULL , 'A list of fields separated by "|" to be displayed along with mandatory fields in the patron quick add form if chosen at patron entry', 'Free' ), >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 7169962c84..35f57635e6 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 >@@ -821,12 +821,21 @@ OPAC: > - "library patrons to register or modify their account via the OPAC." > - "<br><strong>NOTE:</strong> This needs PatronSelfRegistrationDefaultCategory to be set to a valid patron category code." > - >- - pref: PatronSelfRegistrationVerifyByEmail >+ - pref: PatronSelfRegistrationVerifyByEmailToPatron > choices: > yes: Require > no: "Don't require" > - "that a self-registering patron verify themselves via email." >- - "<br><strong>NOTE:</strong> This system preference requires the <code>misc/cronjobs/cleanup_database.pl</code> cronjob. Ask your system administrator to schedule it." >+ >+ - "<p>Enable librarian verification of OPAC self registrations by sending verification email to" >+ - pref: PatronSelfRegistrationVerifyByEmailToLibrary >+ default: 0 >+ choices: >+ 0: None >+ BranchEmailAddress: email address of branch >+ KohaAdminEmailAddress: KohaAdminEmailAddress >+ - "for a librarian to approve activation of Koha account.</p>" >+ - "<br><strong>NOTE:</strong> Both of these system preferences requires the <code>misc/cronjobs/cleanup_database.pl</code> cronjob. Ask your system administrator to schedule it." > - > - "Use the patron category code" > - pref: PatronSelfRegistrationDefaultCategory >-- >2.11.0
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