|
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 ); |