diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index 5a075bafff..9a82fc6268 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -24,6 +24,7 @@ use String::Random qw( random_string ); use C4::Auth; use C4::Output; use C4::Members; +use C4::Form::MessagingPreferences; use Koha::Borrower::Modifications; use C4::Branch qw(GetBranchesLoop); use C4::Scrubber; @@ -146,6 +147,7 @@ if ( $action eq 'create' ) { C4::Context->preference('OpacPasswordChange') ); my ( $borrowernumber, $password ) = AddMember_Opac(%borrower); + C4::Form::MessagingPreferences::handle_form_action($cgi, { borrowernumber => $borrowernumber }, $template, 1, C4::Context->preference('PatronSelfRegistrationDefaultCategory') ) if $borrowernumber && C4::Context->preference('EnhancedMessagingPreferences'); $template->param( password_cleartext => $password ); $template->param( diff --git a/opac/opac-registration-verify.pl b/opac/opac-registration-verify.pl index eaaf52f359..15d57cdd68 100755 --- a/opac/opac-registration-verify.pl +++ b/opac/opac-registration-verify.pl @@ -22,6 +22,7 @@ use CGI qw ( -utf8 ); use C4::Auth; use C4::Output; use C4::Members; +use C4::Form::MessagingPreferences; use Koha::Borrower::Modifications; my $cgi = new CGI; @@ -56,6 +57,7 @@ if ( $m->Verify() ) { if ($borrowernumber) { Koha::Borrower::Modifications->DelModifications({ verification_token => $token }); + C4::Form::MessagingPreferences::handle_form_action($cgi, { borrowernumber => $borrowernumber }, $template, 1, C4::Context->preference('PatronSelfRegistrationDefaultCategory') ) if C4::Context->preference('EnhancedMessagingPreferences'); $template->param( password_cleartext => $password ); $template->param(