@@ -, +, @@ reg verification emails --- a/installer/data/mysql/atomicupdate/bug_25090-add_PatronSelfRegistrationVerificationRecipient_syspref.sql +++ a/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'); --- a/installer/data/mysql/atomicupdate/bug_25090-add_SELF_REG_APPROVED_notice.perl +++ a/installer/data/mysql/atomicupdate/bug_25090-add_SELF_REG_APPROVED_notice.perl @@ -0,0 +1,12 @@ +$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', 'SELF_REG_APPROVED', 'Self registration approved', 'Your self registration has been approved', '

Please click the password reset link below to reset your Koha password then you will be able to login to the OPAC:

+

+ <>/cgi-bin/koha/opac-password-recovery.pl?borrowernumber=<> +

', 1, 'email') + }); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 25090 - Custom destination for OPAC self registration verification emails)\n"; +} --- a/installer/data/mysql/atomicupdate/bug_25090-add_STAFF_VER_OPAC_REG_notice.perl +++ a/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', '

Opac self registration pending verification

+

Submitted Opac patron self registration:

+ +

+

+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: +

+ +

+ <>/cgi-bin/koha/opac-registration-verify.pl?token=<>&approved=1 +

+ +

+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. +

+

', 1, 'email') + }); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug XXXXX - description)\n"; +} --- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql +++ a/installer/data/mysql/de-DE/mandatory/sample_notices.sql @@ -386,3 +386,32 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', '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', '

Opac self registration pending verification

+

Submitted Opac patron self registration:

+ +

+

+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: +

+

+ <>/cgi-bin/koha/opac-registration-verify.pl?token=<>&approved=1 +

+

+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. +

', 1, 'email'), ('members', 'SELF_REG_APPROVED', 'Self registration approved', 'Your self registration has been approved', '

Please click the password reset link below to reset your Koha password then you will be able to login to the OPAC:

+

+ <>/cgi-bin/koha/opac-password-recovery.pl?borrowernumber=<> +

', 1, 'email'); --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ a/installer/data/mysql/en/mandatory/sample_notices.yml @@ -736,6 +736,54 @@ 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: + - "

Opac self registration pending verification

" + - "

Submitted Opac patron self registration:

" + - "" + - "

" + - "

" + - "If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link:" + - "

" + - "<>/cgi-bin/koha/opac-registration-verify.pl?token=<>&approved=1" + - "

" + - "If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly." + - "

" + + - module: members + code: SELF_REG_APPROVED + branchcode: "" + name: "Self registration approved" + is_html: 1 + title: "Your self registration has been approved" + message_transport_type: email + lang: default + content: + - "" + - "

Please click the password reset link below to reset your Koha password then you'll be able to login to the OPAC:

" + - "

" + - "<>/cgi-bin/koha/opac-password-recovery.pl?borrowernumber=<>" + - "

" + + - module: members code: PASSWORD_RESET branchcode: "" name: "Online password reset" --- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql +++ a/installer/data/mysql/es-ES/mandatory/sample_notices.sql @@ -378,3 +378,32 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', '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', '

Opac self registration pending verification

+

Submitted Opac patron self registration:

+ +

+

+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: +

+

+ <>/cgi-bin/koha/opac-registration-verify.pl?token=<>&approved=1 +

+

+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. +

', 1, 'email'),('members', 'SELF_REG_APPROVED', 'Self registration approved', 'Your self registration has been approved', '

Please click the password reset link below to reset your Koha password then you will be able to login to the OPAC:

+

+ <>/cgi-bin/koha/opac-password-recovery.pl?borrowernumber=<> +

', 1, 'email'); --- a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql +++ a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql @@ -268,3 +268,33 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', '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', '

Opac self registration pending verification

+

Submitted Opac patron self registration:

+ +

+

+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: +

+

+ <>/cgi-bin/koha/opac-registration-verify.pl?token=<>&approved=1 +

+

+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. +

', 1, 'email'), ('members', 'SELF_REG_APPROVED', 'Self registration approved', 'Your self registration has been approved', '

Please click the password reset link below to reset your Koha password then you will be able to login to the OPAC:

+

+ <>/cgi-bin/koha/opac-password-recovery.pl?borrowernumber=<> +

', 1, 'email'); --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -379,3 +379,32 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', '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', '

Opac self registration pending verification

+

Submitted Opac patron self registration:

+ +

+

+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: +

+

+ <>/cgi-bin/koha/opac-registration-verify.pl?token=<>&approved=1 +

+

+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. +

', 1, 'email'), ('members', 'SELF_REG_APPROVED', 'Self registration approved', 'Your self registration has been approved', '

Please click the password reset link below to reset your Koha password then you will be able to login to the OPAC:

+

+ <>/cgi-bin/koha/opac-password-recovery.pl?borrowernumber=<> +

', 1, 'email'); --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ a/installer/data/mysql/it-IT/necessari/notices.sql @@ -382,3 +382,32 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', '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', '

Opac self registration pending verification

+

Submitted Opac patron self registration:

+ +

+

+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: +

+

+ <>/cgi-bin/koha/opac-registration-verify.pl?token=<>&approved=1 +

+

+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. +

', 1, 'email'), ('members', 'SELF_REG_APPROVED', 'Self registration approved', 'Your self registration has been approved', '

Please click the password reset link below to reset your Koha password then you will be able to login to the OPAC:

+

+ <>/cgi-bin/koha/opac-password-recovery.pl?borrowernumber=<> +

', 1, 'email'); --- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql +++ a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql @@ -398,3 +398,33 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', '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', '

Opac self registration pending verification

+

Submitted Opac patron self registration:

+ +

+

+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: +

+

+ <>/cgi-bin/koha/opac-registration-verify.pl?token=<>&approved=1 +

+

+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. +

', 1, 'email'), ('members', 'SELF_REG_APPROVED', 'Self registration approved', 'Your self registration has been approved', '

Please click the password reset link below to reset your Koha password then you will be able to login to the OPAC:

+

+ <>/cgi-bin/koha/opac-password-recovery.pl?borrowernumber=<> +

', 1, 'email'); --- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql +++ a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql @@ -376,3 +376,32 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', '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', '

Opac self registration pending verification

+

Submitted Opac patron self registration:

+ +

+

+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: +

+

+ <>/cgi-bin/koha/opac-registration-verify.pl?token=<>&approved=1 +

+

+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. +

', 1, 'email'), ('members', 'SELF_REG_APPROVED', 'Self registration approved', 'Your self registration has been approved', '

Please click the password reset link below to reset your Koha password then you will be able to login to the OPAC:

+

+ <>/cgi-bin/koha/opac-password-recovery.pl?borrowernumber=<> +

', 1, 'email'); --- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql +++ a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql @@ -378,3 +378,32 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', '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', '

Opac self registration pending verification

+

Submitted Opac patron self registration:

+ +

+

+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: +

+

+ <>/cgi-bin/koha/opac-registration-verify.pl?token=<>&approved=1 +

+

+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. +

', 1, 'email'), ('members', 'SELF_REG_APPROVED', 'Self registration approved', 'Your self registration has been approved', '

Please click the password reset link below to reset your Koha password then you will be able to login to the OPAC:

+

+ <>/cgi-bin/koha/opac-password-recovery.pl?borrowernumber=<> +

', 1, 'email'); --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -497,6 +497,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' ), --- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql +++ a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql @@ -469,3 +469,32 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, ', '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', '

Opac self registration pending verification

+

Submitted Opac patron self registration:

+ +

+

+ If you wish to create a Koha patron account thereby giving this patron Opac access please click on this verification link: +

+

+ <>/cgi-bin/koha/opac-registration-verify.pl?token=<>&approved=1 +

+

+ If you did not initiate this request, you may safely ignore this one-time message. The request will expire shortly. +

', 1, 'email'), ('members', 'SELF_REG_APPROVED', 'Self registration approved', 'Your self registration has been approved', '

Please click the password reset link below to reset your Koha password then you will be able to login to the OPAC:

+

+ <>/cgi-bin/koha/opac-password-recovery.pl?borrowernumber=<> +

', 1, 'email'); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -826,6 +826,19 @@ OPAC: - "library patrons to register or modify their account via the OPAC." - "
NOTE: 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 + - "
NOTE: This system preferences requires the PatronSelfRegistrationVerifyByEmail to be set to Require." + - "
If you choose PatronSelfRegistrationVerificationRecipientAddress you have to enter a valid email address:" + - pref: PatronSelfRegistrationVerificationRecipientAddress + class: email + - - pref: PatronSelfRegistrationVerifyByEmail choices: yes: Require --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt @@ -31,6 +31,15 @@
[% END %] + [% IF verificationapproved == 1 %] +
+

New patron registered!

+ +

You have successfully registered a new Koha patron account for [% borrower.firstname | html %] [% borrower.surname | html %].

+

An email containing a password reset link has been sent to [% borrower.firstname | html %] [% borrower.surname | html %]'s email address: [% borrower.email | html %]:

+

Once [% borrower.firstname | html %] [% borrower.surname | html %] has reset their password they will be able to log into and use the Koha OPAC.

+
+ [% ELSE %]

Registration Complete!

@@ -65,7 +74,7 @@
[% PatronSelfRegistrationAdditionalInstructions | $raw %]
- + [% END %]
[% SET OpacNavRight = KohaNews.get( location => "OpacNavRight", lang => news_lang, library => branchcode ) %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-email-sent.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-email-sent.tt @@ -25,6 +25,7 @@ [% ELSE %]
[% END %] + [% IF verificationrecipient == 'RegisteringPatron' %]

Please confirm your registration

@@ -34,6 +35,17 @@

Your account will not be activated until you follow the link provided in the confirmation email.

+ [% ELSE %] +
+
+

Thank you for submitting your library registration

+ +

A library staff member will review your registration shortly, and if approved an email will be sent to [% email | html %] containing your OPAC login credentials.

+ +

Your account will not be activated until it has been approved by a library staff member.

+
+
+ [% END %]
--- a/opac/opac-memberentry.pl +++ a/opac/opac-memberentry.pl @@ -182,28 +182,72 @@ 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->branchreplyto + || $library->branchemail + || C4::Context->preferences('ReplytoDefault') + || C4::Context->preferences('KohaAdminEmailAddress') + } + 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'), } ); - my $num_letters_attempted = C4::Letters::SendQueuedMessages( { + if ($verificationrecipient eq "RegisteringPatron") { + my $num_letters_attempted = C4::Letters::SendQueuedMessages( { letter_code => 'OPAC_REG_VERIFY' - } ); + } ); + } else { + my $num_letters_attempted = C4::Letters::SendQueuedMessages( { + letter_code => 'STAFF_VER_OPAC_REG' + } ); + } } else { ( $template, $borrowernumber, $cookie ) = get_template_and_user( --- a/opac/opac-password-recovery.pl +++ a/opac/opac-password-recovery.pl @@ -28,12 +28,14 @@ my ( $template, $dummy, $cookie ) = get_template_and_user( my $email = $query->param('email') // q{}; my $password = $query->param('password'); -my $repeatPassword = $query->param('repeatPassword'); +my $repeatPassword '= $query->param('repeatPassword'); my $id = $query->param('id'); my $uniqueKey = $query->param('uniqueKey'); my $username = $query->param('username') // q{}; my $borrower_number; +$borrower_number = $query->param('borrowernumber') if ($query->param('borrowernumber')); + #errors my $hasError; @@ -208,7 +210,12 @@ elsif ($uniqueKey) { #reset password form ); } else { #password recovery form (to send email) - $template->param( password_recovery => 1 ); + my $borrower = Koha::Patrons->find($borrower_number); + $template->param( + password_recovery => 1, + email => $borrower->email, + username => $borrower->userid + ); } output_html_with_http_headers $query, $cookie, $template->output; --- a/opac/opac-registration-verify.pl +++ a/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( verificationapproved => $verificationapproval ) if $verificationapproval; + Koha::Patron::Consent->new({ borrowernumber => $patron->borrowernumber, type => 'GDPR_PROCESSING', given_on => $consent_dt })->store if $consent_dt; if ($patron) { --