From e95fa4c6ef2dd4927210930f17f1bec65713b2ce Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Wed, 4 Jun 2025 23:46:49 +0000 Subject: [PATCH] Bug 25090: Update OPAC_REG notice to include verification link Signed-off-by: David Nind --- ..._25090_-_add_OPAC_REG_VERIFY_LIB_notice.pl | 30 +++++++++++++++++++ .../mysql/en/mandatory/sample_notices.yml | 26 ++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_25090_-_add_OPAC_REG_VERIFY_LIB_notice.pl diff --git a/installer/data/mysql/atomicupdate/bug_25090_-_add_OPAC_REG_VERIFY_LIB_notice.pl b/installer/data/mysql/atomicupdate/bug_25090_-_add_OPAC_REG_VERIFY_LIB_notice.pl new file mode 100755 index 0000000000..42d89d58d4 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_25090_-_add_OPAC_REG_VERIFY_LIB_notice.pl @@ -0,0 +1,30 @@ +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{INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, message_transport_type, lang, content) VALUES ("members", "OPAC_REG_VERIFY_LIB", "", "New OPAC self-registration submitted for verification", 1, "Verify new OPAC self-registration", "email", "default", "

New OPAC self-registration to verify

+

Self-registration made:

+[% IF patron_modification.verification_token %]

Use this link to verify the account: [% Koha.Preference('OPACBaseURL') %]/cgi-bin/koha/opac-registration-verify.pl?token=[% patron_modification.verification_token %]&library_approval=1

[% END %]")} + ); + + say_success( $out, "Added notice 'OPAC_REG_VERIFY_LIB" ); + }, +}; diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 3a10265310..b91268ca56 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -2722,3 +2722,29 @@ tables: - "[% skipped %] records skipped" - "[% in_error %] records in error" - "[% total %] total" + + - module: members + code: OPAC_REG_VERIFY_LIB + branchcode: "" + name: "New OPAC self-registration submitted for verification" + is_html: 1 + title: "Verify new OPAC self-registration" + message_transport_type: email + lang: default + content: + - "

New OPAC self-registration to verify

" + - "

Self-registration made:

" + - "" + - "

" + - "[% IF patron_modification.verification_token %]

Use this link to verify the account: [% Koha.Preference('OPACBaseURL') %]/cgi-bin/koha/opac-registration-verify.pl?token=[% patron_modification.verification_token %]&library_approval=1

[% END %]" -- 2.39.5