View | Details | Raw Unified | Return to bug 37339
Collapse All | Expand All

(-)a/opac/opac-memberentry.pl (-9 / +3 lines)
Lines 29-34 use C4::Output qw( output_html_with_http_headers ); Link Here
29
use C4::Context;
29
use C4::Context;
30
use C4::Letters qw( GetPreparedLetter EnqueueLetter SendQueuedMessages );
30
use C4::Letters qw( GetPreparedLetter EnqueueLetter SendQueuedMessages );
31
use C4::Form::MessagingPreferences;
31
use C4::Form::MessagingPreferences;
32
use C4::Members::Messaging qw( SetMessagingPreferencesFromDefaults );
32
use Koha::AuthUtils;
33
use Koha::AuthUtils;
33
use Koha::Patrons;
34
use Koha::Patrons;
34
use Koha::Patron::Consent;
35
use Koha::Patron::Consent;
Lines 230-235 if ( $op eq 'cud-create' ) { Link Here
230
            try {
231
            try {
231
                $patron = Koha::Patron->new( \%borrower )->store;
232
                $patron = Koha::Patron->new( \%borrower )->store;
232
                Koha::Patron::Consent->new({ borrowernumber => $patron->borrowernumber, type => 'GDPR_PROCESSING', given_on => $consent_dt })->store if $patron && $consent_dt;
233
                Koha::Patron::Consent->new({ borrowernumber => $patron->borrowernumber, type => 'GDPR_PROCESSING', given_on => $consent_dt })->store if $patron && $consent_dt;
234
                C4::Members::Messaging::SetMessagingPreferencesFromDefaults(
235
                    { borrowernumber => $patron->borrowernumber, categorycode => $patron->categorycode } );
233
            } catch {
236
            } catch {
234
                my $type = ref($_);
237
                my $type = ref($_);
235
                my $info = "$_";
238
                my $info = "$_";
Lines 249-263 if ( $op eq 'cud-create' ) { Link Here
249
            if ( $patron ) {
252
            if ( $patron ) {
250
                $patron->extended_attributes->filter_by_branch_limitations->delete;
253
                $patron->extended_attributes->filter_by_branch_limitations->delete;
251
                $patron->extended_attributes($attributes);
254
                $patron->extended_attributes($attributes);
252
                if ( C4::Context->preference('EnhancedMessagingPreferences') ) {
253
                    C4::Form::MessagingPreferences::handle_form_action(
254
                        $cgi,
255
                        { borrowernumber => $patron->borrowernumber },
256
                        $template,
257
                        1,
258
                        $PatronSelfRegistrationDefaultCategory
259
                    );
260
                }
261
255
262
                $template->param( password_cleartext => $patron->plain_text_password );
256
                $template->param( password_cleartext => $patron->plain_text_password );
263
                $template->param( borrower => $patron->unblessed );
257
                $template->param( borrower => $patron->unblessed );
(-)a/opac/opac-registration-verify.pl (-2 / +3 lines)
Lines 25-30 use C4::Context; Link Here
25
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Letters qw( GetPreparedLetter EnqueueLetter SendQueuedMessages );
26
use C4::Letters qw( GetPreparedLetter EnqueueLetter SendQueuedMessages );
27
use C4::Members;
27
use C4::Members;
28
use C4::Members::Messaging qw( SetMessagingPreferencesFromDefaults );
28
use C4::Form::MessagingPreferences;
29
use C4::Form::MessagingPreferences;
29
use Koha::AuthUtils;
30
use Koha::AuthUtils;
30
use Koha::Patrons;
31
use Koha::Patrons;
Lines 90-95 elsif ( $rego_found Link Here
90
    try {
91
    try {
91
        $patron = Koha::Patron->new( $patron_attrs )->store;
92
        $patron = Koha::Patron->new( $patron_attrs )->store;
92
        Koha::Patron::Consent->new({ borrowernumber => $patron->borrowernumber, type => 'GDPR_PROCESSING', given_on => $consent_dt })->store if $patron && $consent_dt;
93
        Koha::Patron::Consent->new({ borrowernumber => $patron->borrowernumber, type => 'GDPR_PROCESSING', given_on => $consent_dt })->store if $patron && $consent_dt;
94
        C4::Members::Messaging::SetMessagingPreferencesFromDefaults(
95
            { borrowernumber => $patron->borrowernumber, categorycode => $patron->categorycode } );
93
    } catch {
96
    } catch {
94
        $error_type = ref($_);
97
        $error_type = ref($_);
95
        $error_info = "$_";
98
        $error_info = "$_";
Lines 112-118 elsif ( $rego_found Link Here
112
            }
115
            }
113
        );
116
        );
114
        $template->param( "confirmed" => 1 );
117
        $template->param( "confirmed" => 1 );
115
        C4::Form::MessagingPreferences::handle_form_action($cgi, { borrowernumber => $patron->borrowernumber }, $template, 1, C4::Context->preference('PatronSelfRegistrationDefaultCategory') ) if C4::Context->preference('EnhancedMessagingPreferences');
116
118
117
        $template->param( password_cleartext => $patron->plain_text_password );
119
        $template->param( password_cleartext => $patron->plain_text_password );
118
        $template->param( borrower => $patron );
120
        $template->param( borrower => $patron );
119
- 

Return to bug 37339