|
Lines 66-77
if (
Link Here
|
| 66 |
delete $patron_attrs->{timestamp}; |
66 |
delete $patron_attrs->{timestamp}; |
| 67 |
delete $patron_attrs->{verification_token}; |
67 |
delete $patron_attrs->{verification_token}; |
| 68 |
delete $patron_attrs->{changed_fields}; |
68 |
delete $patron_attrs->{changed_fields}; |
|
|
69 |
delete $patron_attrs->{extended_attributes}; |
| 69 |
my $patron = Koha::Patron->new( $patron_attrs )->store; |
70 |
my $patron = Koha::Patron->new( $patron_attrs )->store; |
| 70 |
|
71 |
|
| 71 |
Koha::Patron::Consent->new({ borrowernumber => $patron->borrowernumber, type => 'GDPR_PROCESSING', given_on => $consent_dt })->store if $consent_dt; |
72 |
Koha::Patron::Consent->new({ borrowernumber => $patron->borrowernumber, type => 'GDPR_PROCESSING', given_on => $consent_dt })->store if $consent_dt; |
| 72 |
|
73 |
|
| 73 |
if ($patron) { |
74 |
if ($patron) { |
| 74 |
$m->delete(); |
75 |
if( $m->extended_attributes ){ |
|
|
76 |
$m->borrowernumber( $patron->borrowernumber); |
| 77 |
$m->changed_fields(['extended_attributes']); |
| 78 |
$m->approve(); |
| 79 |
} else { |
| 80 |
$m->delete(); |
| 81 |
} |
| 75 |
C4::Form::MessagingPreferences::handle_form_action($cgi, { borrowernumber => $patron->borrowernumber }, $template, 1, C4::Context->preference('PatronSelfRegistrationDefaultCategory') ) if C4::Context->preference('EnhancedMessagingPreferences'); |
82 |
C4::Form::MessagingPreferences::handle_form_action($cgi, { borrowernumber => $patron->borrowernumber }, $template, 1, C4::Context->preference('PatronSelfRegistrationDefaultCategory') ) if C4::Context->preference('EnhancedMessagingPreferences'); |
| 76 |
|
83 |
|
| 77 |
$template->param( password_cleartext => $patron->plain_text_password ); |
84 |
$template->param( password_cleartext => $patron->plain_text_password ); |
| 78 |
- |
|
|