Bugzilla – Attachment 102845 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 sysprefs to define destination of OPAC self reg verification emails
Bug-25090-Add-sysprefs-to-define-destination-of-OP.patch (text/plain), 39.06 KB, created by
Alex Buckley
on 2020-04-13 14:32:37 UTC
(
hide
)
Description:
Bug 25090: Add sysprefs to define destination of OPAC self reg verification emails
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2020-04-13 14:32:37 UTC
Size:
39.06 KB
patch
obsolete
>From 0952a793a948d034041a182511fb23696530cc72 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Mon, 13 Apr 2020 14:30:49 +0000 >Subject: [PATCH] Bug 25090: Add sysprefs to define destination of OPAC self > reg verification emails > >Test plan: >To come > >Sponsored-By: Mental Health Education Resource Centre, NZ >--- > ...lfRegistrationVerificationRecipient_syspref.sql | 2 + > .../bug_25090-add_STAFF_VER_OPAC_REG_notice.perl | 36 ++++++++++++++ > .../data/mysql/de-DE/mandatory/sample_notices.sql | 28 +++++++++++ > .../data/mysql/en/mandatory/sample_notices.yml | 33 +++++++++++++ > .../data/mysql/es-ES/mandatory/sample_notices.sql | 27 +++++++++++ > .../mysql/fr-CA/obligatoire/sample_notices.sql | 27 +++++++++++ > .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 26 ++++++++++ > installer/data/mysql/it-IT/necessari/notices.sql | 27 +++++++++++ > .../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 27 +++++++++++ > .../data/mysql/pl-PL/mandatory/sample_notices.sql | 26 ++++++++++ > .../data/mysql/ru-RU/mandatory/sample_notices.sql | 26 ++++++++++ > installer/data/mysql/sysprefs.sql | 2 + > .../data/mysql/uk-UA/mandatory/sample_notices.sql | 26 ++++++++++ > .../prog/en/modules/admin/preferences/opac.pref | 13 +++++ > .../en/modules/opac-registration-confirmation.tt | 21 ++++++++- > .../en/modules/opac-registration-email-sent.tt | 12 +++++ > opac/opac-memberentry.pl | 55 ++++++++++++++++++---- > opac/opac-registration-verify.pl | 3 ++ > 18 files changed, 406 insertions(+), 11 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_25090-add_PatronSelfRegistrationVerificationRecipient_syspref.sql > create mode 100644 installer/data/mysql/atomicupdate/bug_25090-add_STAFF_VER_OPAC_REG_notice.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_25090-add_PatronSelfRegistrationVerificationRecipient_syspref.sql b/installer/data/mysql/atomicupdate/bug_25090-add_PatronSelfRegistrationVerificationRecipient_syspref.sql >new file mode 100644 >index 0000000000..387c190641 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_25090-add_PatronSelfRegistrationVerificationRecipient_syspref.sql >@@ -0,0 +1,2 @@ >+INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('PatronSelfRegistrationVerificationRecipient', 'RegisteringPatron', 'PatronSelfRegistrationVerificationRecipientAddress|BranchEmailAddress|KohaAdminEmailAddress|RegisteringPatron', 'Choose email address that self registering users verification email will be sent to.', 'Choice'); >+INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('PatronSelfRegistrationVerificationRecipientAddress', '', '', 'If you choose PatronSelfRegistrationVerificationRecipientAddress you have to enter a valid email address:', 'free'); >diff --git a/installer/data/mysql/atomicupdate/bug_25090-add_STAFF_VER_OPAC_REG_notice.perl b/installer/data/mysql/atomicupdate/bug_25090-add_STAFF_VER_OPAC_REG_notice.perl >new file mode 100644 >index 0000000000..6e47fef95f >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_25090-add_STAFF_VER_OPAC_REG_notice.perl >@@ -0,0 +1,36 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{ >+ INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3> >+<p><h4>Submitted Opac patron self registration:<h4> >+ <ul> >+ <li><<borrower_modifications.cardnumber>></li> >+ <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li> >+ <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li> >+ <li>Email: <<borrower_modifications.email>></li> >+ <li>Phone: <<borrower_modifications.phone>></li> >+ <li>Mobile: <<borrower_modifications.mobile>></li> >+ <li>Fax: <<borrower_modifications.fax>></li> >+ <li>Secondary email: <<borrower_modifications.emailpro>></li> >+ <li>Secondary phone:<<borrower_modifications.phonepro>></li> >+ <li>Home library: <<borrower_modifications.branchcode>></li> >+ <li>Temporary patron category: <<borrower_modifications.categorycode>></li> >+ </ul> >+ </p> >+ <p> >+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: >+ </p> >+ >+ <p> >+ <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1 >+ </p> >+ >+ <p> >+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. >+ </p> >+ </p>', 1, 'email') >+ }); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug XXXXX - description)\n"; >+} >diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql >index 0fbf5f73d2..587f733117 100644 >--- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql >+++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql >@@ -386,3 +386,31 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3> >+<p><h4>Submitted Opac patron self registration:<h4> >+ <ul> >+ <li><<borrower_modifications.cardnumber>></li> >+ <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li> >+ <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li> >+ <li>Email: <<borrower_modifications.email>></li> >+ <li>Phone: <<borrower_modifications.phone>></li> >+ <li>Mobile: <<borrower_modifications.mobile>></li> >+ <li>Fax: <<borrower_modifications.fax>></li> >+ <li>Secondary email: <<borrower_modifications.emailpro>></li> >+ <li>Secondary phone:<<borrower_modifications.phonepro>></li> >+ <li>Home library: <<borrower_modifications.branchcode>></li> >+ <li>Temporary patron category: <<borrower_modifications.categorycode>></li> >+ </ul> >+ </p> >+ <p> >+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: >+ <p> >+ <p> >+ <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1 >+ </p> >+ <p> >+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. >+ </p>', 1, 'email'); >+ >+ >diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml >index 7f814c377b..5622f319d4 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.yml >+++ b/installer/data/mysql/en/mandatory/sample_notices.yml >@@ -736,6 +736,39 @@ tables: > - "If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly." > > - module: members >+ code: STAFF_VER_OPAC_REG >+ branchode: "" >+ name: "New patron Opac Self-Registration to verify" >+ is_html: 1 >+ title: "Verify new Opac patron self registration" >+ message_transport_type: email >+ lang: default >+ content: >+ - "<h3>Opac self registration pending verification</h3>" >+ - "<p><h4>Submitted Opac patron self registration:<h4>" >+ - "<ul>" >+ - "<li><<borrower_modifications.cardnumber>></li>" >+ - "<li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li>" >+ - "<li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li>" >+ - "<li>Email: <<borrower_modifications.email>></li>" >+ - "<li>Phone: <<borrower_modifications.phone>></li>" >+ - "<li>Mobile: <<borrower_modifications.mobile>></li>" >+ - "<li>Fax: <<borrower_modifications.fax>></li>" >+ - "<li>Secondary email: <<borrower_modifications.emailpro>></li>" >+ - "<li>Secondary phone:<<borrower_modifications.phonepro>></li>" >+ - "<li>Home library: <<borrower_modifications.branchcode>></li>" >+ - "<li>Temporary patron category: <<borrower_modifications.categorycode>></li>" >+ - "</ul>" >+ - "</p>" >+ - "<p>" >+ - "If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link:" >+ - "<p>" >+ - "<<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1" >+ - "</p>" >+ - "If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly." >+ - "</p>" >+ >+ - module: members > code: PASSWORD_RESET > branchcode: "" > name: "Online password reset" >diff --git a/installer/data/mysql/es-ES/mandatory/sample_notices.sql b/installer/data/mysql/es-ES/mandatory/sample_notices.sql >index 4ee0a6c800..ab94309cdd 100644 >--- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql >+++ b/installer/data/mysql/es-ES/mandatory/sample_notices.sql >@@ -378,3 +378,30 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3> >+<p><h4>Submitted Opac patron self registration:<h4> >+ <ul> >+ <li><<borrower_modifications.cardnumber>></li> >+ <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li> >+ <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li> >+ <li>Email: <<borrower_modifications.email>></li> >+ <li>Phone: <<borrower_modifications.phone>></li> >+ <li>Mobile: <<borrower_modifications.mobile>></li> >+ <li>Fax: <<borrower_modifications.fax>></li> >+ <li>Secondary email: <<borrower_modifications.emailpro>></li> >+ <li>Secondary phone:<<borrower_modifications.phonepro>></li> >+ <li>Home library: <<borrower_modifications.branchcode>></li> >+ <li>Temporary patron category: <<borrower_modifications.categorycode>></li> >+ </ul> >+ </p> >+ <p> >+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: >+ <p> >+ <p> >+ <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1 >+ </p> >+ <p> >+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. >+ </p>', 1, 'email'); >+ >diff --git a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql >index ba88804699..1d92ecbaec 100644 >--- a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql >+++ b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql >@@ -268,3 +268,30 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+ >+INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3> >+<p><h4>Submitted Opac patron self registration:<h4> >+ <ul> >+ <li><<borrower_modifications.cardnumber>></li> >+ <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li> >+ <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li> >+ <li>Email: <<borrower_modifications.email>></li> >+ <li>Phone: <<borrower_modifications.phone>></li> >+ <li>Mobile: <<borrower_modifications.mobile>></li> >+ <li>Fax: <<borrower_modifications.fax>></li> >+ <li>Secondary email: <<borrower_modifications.emailpro>></li> >+ <li>Secondary phone:<<borrower_modifications.phonepro>></li> >+ <li>Home library: <<borrower_modifications.branchcode>></li> >+ <li>Temporary patron category: <<borrower_modifications.categorycode>></li> >+ </ul> >+ </p> >+ <p> >+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: >+ <p> >+ <p> >+ <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1 >+ </p> >+ <p> >+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. >+ </p>', 1, 'email'); >diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >index 6106d737f3..eb982a52a1 100644 >--- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >+++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >@@ -379,3 +379,29 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3> >+<p><h4>Submitted Opac patron self registration:<h4> >+ <ul> >+ <li><<borrower_modifications.cardnumber>></li> >+ <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li> >+ <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li> >+ <li>Email: <<borrower_modifications.email>></li> >+ <li>Phone: <<borrower_modifications.phone>></li> >+ <li>Mobile: <<borrower_modifications.mobile>></li> >+ <li>Fax: <<borrower_modifications.fax>></li> >+ <li>Secondary email: <<borrower_modifications.emailpro>></li> >+ <li>Secondary phone:<<borrower_modifications.phonepro>></li> >+ <li>Home library: <<borrower_modifications.branchcode>></li> >+ <li>Temporary patron category: <<borrower_modifications.categorycode>></li> >+ </ul> >+ </p> >+ <p> >+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: >+ <p> >+ <p> >+ <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1 >+ </p> >+ <p> >+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. >+ </p>', 1, 'email'); >diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql >index e462da9d00..e536d931b9 100644 >--- a/installer/data/mysql/it-IT/necessari/notices.sql >+++ b/installer/data/mysql/it-IT/necessari/notices.sql >@@ -382,3 +382,30 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3> >+<p><h4>Submitted Opac patron self registration:<h4> >+ <ul> >+ <li><<borrower_modifications.cardnumber>></li> >+ <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li> >+ <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li> >+ <li>Email: <<borrower_modifications.email>></li> >+ <li>Phone: <<borrower_modifications.phone>></li> >+ <li>Mobile: <<borrower_modifications.mobile>></li> >+ <li>Fax: <<borrower_modifications.fax>></li> >+ <li>Secondary email: <<borrower_modifications.emailpro>></li> >+ <li>Secondary phone:<<borrower_modifications.phonepro>></li> >+ <li>Home library: <<borrower_modifications.branchcode>></li> >+ <li>Temporary patron category: <<borrower_modifications.categorycode>></li> >+ </ul> >+ </p> >+ <p> >+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: >+ <p> >+ <p> >+ <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1 >+ </p> >+ <p> >+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. >+ </p>', 1, 'email'); >+ >diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >index 8439fd96d8..4c0e8aebf2 100644 >--- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >+++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >@@ -398,3 +398,30 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+ >+INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3> >+<p><h4>Submitted Opac patron self registration:<h4> >+ <ul> >+ <li><<borrower_modifications.cardnumber>></li> >+ <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li> >+ <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li> >+ <li>Email: <<borrower_modifications.email>></li> >+ <li>Phone: <<borrower_modifications.phone>></li> >+ <li>Mobile: <<borrower_modifications.mobile>></li> >+ <li>Fax: <<borrower_modifications.fax>></li> >+ <li>Secondary email: <<borrower_modifications.emailpro>></li> >+ <li>Secondary phone:<<borrower_modifications.phonepro>></li> >+ <li>Home library: <<borrower_modifications.branchcode>></li> >+ <li>Temporary patron category: <<borrower_modifications.categorycode>></li> >+ </ul> >+ </p> >+ <p> >+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: >+ <p> >+ <p> >+ <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1 >+ </p> >+ <p> >+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. >+ </p>', 1, 'email'); >diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >index 6373e2e975..3e3cc14c16 100644 >--- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >+++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >@@ -376,3 +376,29 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3> >+<p><h4>Submitted Opac patron self registration:<h4> >+ <ul> >+ <li><<borrower_modifications.cardnumber>></li> >+ <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li> >+ <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li> >+ <li>Email: <<borrower_modifications.email>></li> >+ <li>Phone: <<borrower_modifications.phone>></li> >+ <li>Mobile: <<borrower_modifications.mobile>></li> >+ <li>Fax: <<borrower_modifications.fax>></li> >+ <li>Secondary email: <<borrower_modifications.emailpro>></li> >+ <li>Secondary phone:<<borrower_modifications.phonepro>></li> >+ <li>Home library: <<borrower_modifications.branchcode>></li> >+ <li>Temporary patron category: <<borrower_modifications.categorycode>></li> >+ </ul> >+ </p> >+ <p> >+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: >+ <p> >+ <p> >+ <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1 >+ </p> >+ <p> >+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. >+ </p>', 1, 'email'); >diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >index f9c4fc55d5..625fa3c3ae 100644 >--- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >+++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >@@ -378,3 +378,29 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3> >+<p><h4>Submitted Opac patron self registration:<h4> >+ <ul> >+ <li><<borrower_modifications.cardnumber>></li> >+ <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li> >+ <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li> >+ <li>Email: <<borrower_modifications.email>></li> >+ <li>Phone: <<borrower_modifications.phone>></li> >+ <li>Mobile: <<borrower_modifications.mobile>></li> >+ <li>Fax: <<borrower_modifications.fax>></li> >+ <li>Secondary email: <<borrower_modifications.emailpro>></li> >+ <li>Secondary phone:<<borrower_modifications.phonepro>></li> >+ <li>Home library: <<borrower_modifications.branchcode>></li> >+ <li>Temporary patron category: <<borrower_modifications.categorycode>></li> >+ </ul> >+ </p> >+ <p> >+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: >+ <p> >+ <p> >+ <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1 >+ </p> >+ <p> >+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. >+ </p>', 1, 'email'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index a15c4c6c95..92d83a3a8c 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -492,6 +492,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'), >+('PatronSelfRegistrationVerificationRecipient', 'RegisteringPatron', 'PatronSelfRegistrationVerificationRecipientAddress|BranchEmailAddress|KohaAdminEmailAddress|RegisteringPatron', 'Choose email address that self registering users verification email will be sent to', 0, 'Choice'), >+('PatronSelfRegistrationVerificationRecipientAddress', '', '', 'If you choose PatronSelfRegistrationVerificationRecipientAddress you have to enter a valid email address:', 'free'), > ('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'), > ('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' ), >diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >index 5356ad74f4..123b5d7eca 100644 >--- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >+++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >@@ -469,3 +469,29 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </tr> > </tfoot> > </table>', 'print', 'default'); >+ >+INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) VALUES ('members', 'STAFF_VER_OPAC_REG', 'New patron Opac Self-Registration to verify', 'Verify new Opac patron self registration', '<h3>Opac self registration pending verification</h3> >+<p><h4>Submitted Opac patron self registration:<h4> >+ <ul> >+ <li><<borrower_modifications.cardnumber>></li> >+ <li><<borrower_modifications.title>> <<borrower_modifications.firstname>> <<borrower_modifications.surname>></li> >+ <li>Physical address: <<borrower_modifications.streetnumber>> <<borrower_modifications.streettype>> <<borrower_modifications.address>> <<borrower_modifications.address2>>, <<borrower_modifications.city>>, <<borrower_modifications.state>> <<borrower_modifications.zipcode>>, <<borrower_modifications.country>></li> >+ <li>Email: <<borrower_modifications.email>></li> >+ <li>Phone: <<borrower_modifications.phone>></li> >+ <li>Mobile: <<borrower_modifications.mobile>></li> >+ <li>Fax: <<borrower_modifications.fax>></li> >+ <li>Secondary email: <<borrower_modifications.emailpro>></li> >+ <li>Secondary phone:<<borrower_modifications.phonepro>></li> >+ <li>Home library: <<borrower_modifications.branchcode>></li> >+ <li>Temporary patron category: <<borrower_modifications.categorycode>></li> >+ </ul> >+ </p> >+ <p> >+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: >+ <p> >+ <p> >+ <<OPACBaseURL>>/cgi-bin/koha/opac-registration-verify.pl?token=<<borrower_modifications.verification_token>>&approved=1 >+ </p> >+ <p> >+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. >+ </p>', 1, 'email'); >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 c705a288c3..202aca8f78 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 >@@ -818,6 +818,19 @@ 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." > - >+ - "Choose email address that self registration verification emails will be sent to: " >+ - pref: PatronSelfRegistrationVerificationRecipient >+ default: RegisteringPatron >+ choices: >+ RegisteringPatron: email address of Self registering patron >+ PatronSelfRegistrationVerificationRecipientAddress: PatronSelfRegistrationVerificationRecipientAddress >+ BranchEmailAddress: email address of branch >+ KohaAdminEmailAddress: KohaAdminEmailAddress >+ - "<br><strong>NOTE:</strong> This system preferences requires the PatronSelfRegistrationVerifyByEmail to be set to Require." >+ - "<br>If you choose PatronSelfRegistrationVerificationRecipientAddress you have to enter a valid email address:" >+ - pref: PatronSelfRegistrationVerificationRecipientAddress >+ class: email >+ - > - pref: PatronSelfRegistrationVerifyByEmail > choices: > yes: Require >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt >index 2fc4493983..edeb361910 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt >@@ -31,6 +31,25 @@ > <div class="span9"> > [% END %] > >+ [% IF verificationapproved == 'approved' %] >+ <div id="registration-complete"> >+ <h1>New patron registered!</h1> >+ >+ <p>You have successfully registered a new Koha patron account for [% borrower.firstname | html %] [% borrower.surname | html %].</p> >+ >+ <p>Please copy the username and password listed below into an email to [% borrower.firstname | html %] [% borrower.surname | html %]'s email [% borrower.email | html %]:</p> >+ >+ <p id="patron-userid-p"> >+ <span id="patron-userid-label">Username:</span> >+ <span id="patron-userid">[% borrower.userid | html %]</span> >+ </p> >+ <p id="patron-password-p"> >+ <span id="patron-password-label">Password:</span> >+ <span id="patron-password">[% password_cleartext | html %]</span> >+ </p> >+ <p>Please ask the patron to login and change their password.</p> >+ </div> >+ [% ELSE %] > <div id="registration-complete"> > <h1>Registration Complete!</h1> > >@@ -65,7 +84,7 @@ > > <div id="PatronSelfRegistrationAdditionalInstructions">[% PatronSelfRegistrationAdditionalInstructions | $raw %]</div> > </div> >- >+ [% END %] > </div> <!-- / .span7/9 --> > > [% SET OpacNavRight = KohaNews.get( location => "OpacNavRight", lang => news_lang, library => branchcode ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-email-sent.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-email-sent.tt >index 1a4bdce4d4..036f19bd30 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-email-sent.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-email-sent.tt >@@ -25,6 +25,7 @@ > [% ELSE %] > <div class="span12"> > [% END %] >+ [% IF verificationrecipient == 'RegisteringPatron' %] > <div id="reistration-confirmation-pending"> > <div id="confirmation-pending" class="alert alert-info"> > <h1>Please confirm your registration</h1> >@@ -34,6 +35,17 @@ > <p>Your account will not be activated until you follow the link provided in the confirmation email.</p> > </div> > </div> >+ [% ELSE %] >+ <div id="registration-confirmation-pending"> >+ <div id="confirmation-pending" class="alert alert-info"> >+ <h1>Thank you for submitting your library registration</h1> >+ >+ <p>A library staff member will review your registration shortly, and if approved an email will be sent to <strong>[% email | html %]</strong> containing your OPAC login credentials.</p> >+ >+ <p>Your account will not be activated until it has been approved by a library staff member.</p> >+ </div> >+ </div> >+ [% END %] > </div> > </div> > </div> >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index 3f6d8a8735..b877e083ea 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -176,21 +176,56 @@ if ( $action eq 'create' ) { > > Koha::Patron::Modification->new( \%borrower )->store(); > >- #Send verification email >- my $letter = C4::Letters::GetPreparedLetter( >- module => 'members', >- letter_code => 'OPAC_REG_VERIFY', >- lang => 'default', # Patron does not have a preferred language defined yet >- tables => { >- borrower_modifications => $verification_token, >- }, >- ); >+ my $verificationrecipient = C4::Context->preference("PatronSelfRegistrationVerificationRecipient"); >+ my $customverificationrecipient = C4::Context->preference("PatronSelfRegistrationVerificationRecipientAddress"); >+ # Determine the 'to_address' of the verification email >+ my $toaddress; >+ if ($verificationrecipient eq "BranchEmailAddress" ) { >+ my $library = Koha::Libraries->find( $borrower{branchcode} ); >+ $toaddress = $library->inbound_email_address; >+ } >+ elsif ( $verificationrecipient eq "KohaAdminEmailAddress" ) { >+ $toaddress = C4::Context->preference('ReplytoDefault') >+ || C4::Context->preference('KohaAdminEmailAddress'); >+ >+ } elsif ( $verificationrecipient eq "RegisteringPatron" ) { >+ $toaddress = $borrower{'email'} >+ } else { >+ $toaddress = >+ $customverificationrecipient >+ || C4::Context->preference('ReplytoDefault') >+ || C4::Context->preference('KohaAdminEmailAddress'); >+ } >+ $template->param( verificationrecipient => $verificationrecipient ); >+ >+ my $letter; >+ if ($verificationrecipient eq "RegisteringPatron" ) { >+ # Send verification email directly to registering patron >+ $letter = C4::Letters::GetPreparedLetter( >+ module => 'members', >+ letter_code => 'OPAC_REG_VERIFY', >+ lang => 'default', # Patron does not have a preferred language defined yet >+ tables => { >+ borrower_modifications => $verification_token, >+ }, >+ ); >+ } else { >+ # Send verification email to library >+ $letter = C4::Letters::GetPreparedLetter( >+ module => 'members', >+ letter_code => 'STAFF_VER_OPAC_REG', >+ lang => 'default', # Patron does not have a preferred language defined yet >+ tables => { >+ borrower_modifications => $verification_token, >+ }, >+ ); >+ } > > C4::Letters::EnqueueLetter( > { > letter => $letter, > message_transport_type => 'email', >- to_address => $borrower{'email'}, >+ to_address => $toaddress, > from_address => > C4::Context->preference('KohaAdminEmailAddress'), > } >diff --git a/opac/opac-registration-verify.pl b/opac/opac-registration-verify.pl >index d408d5c5ae..32cf5bb167 100755 >--- a/opac/opac-registration-verify.pl >+++ b/opac/opac-registration-verify.pl >@@ -38,6 +38,7 @@ unless ( C4::Context->preference('PatronSelfRegistration') ) { > > my $token = $cgi->param('token'); > my $m = Koha::Patron::Modifications->find( { verification_token => $token } ); >+my $verificationapproval = $cgi->param('approved'); > > my ( $template, $borrowernumber, $cookie ); > >@@ -67,6 +68,8 @@ if ( > delete $patron_attrs->{changed_fields}; > my $patron = Koha::Patron->new( $patron_attrs )->store; > >+ $template->param( verificationapproval => $verificationapproval ) if $verificationapproval; >+ > Koha::Patron::Consent->new({ borrowernumber => $patron->borrowernumber, type => 'GDPR_PROCESSING', given_on => $consent_dt })->store if $consent_dt; > > if ($patron) { >-- >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