@@ -, +, @@ registration verification by email SELECT * FROM message_queue; --- .../prog/en/modules/admin/patron-attr-types.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 2 +- opac/opac-memberentry.pl | 1 + opac/opac-registration-verify.pl | 9 ++++++++- 4 files changed, 11 insertions(+), 3 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt @@ -165,7 +165,7 @@ Patron attribute types › Administration › Koha [% ELSE %] [% END %] - Check to allow patrons to edit this attribute from their details page in the OPAC. (Requires above, does not work during self-registration if PatronSelfRegistrationVerifyByEmail is set.) + Check to allow patrons to edit this attribute from their details page in the OPAC. (Requires above)
  • [% IF attribute_type AND attribute_type.staff_searchable %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -883,7 +883,7 @@ [% END %] - [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size && ! ( action == 'new' && Koha.Preference('PatronSelfRegistrationVerifyByEmail') ) ) %] + [% IF ( Koha.Preference('ExtendedPatronAttributes') && patron_attribute_classes.size ) %]
    [% FOREACH pa_class IN patron_attribute_classes %] --- a/opac/opac-memberentry.pl +++ a/opac/opac-memberentry.pl @@ -189,6 +189,7 @@ if ( $action eq 'create' ) { $borrower{password} = Koha::AuthUtils::generate_password(Koha::Patron::Categories->find($borrower{categorycode})) unless $borrower{password}; $borrower{verification_token} = $verification_token; + $borrower{extended_attributes} = to_json($attributes); Koha::Patron::Modification->new( \%borrower )->store(); #Send verification email --- a/opac/opac-registration-verify.pl +++ a/opac/opac-registration-verify.pl @@ -66,12 +66,19 @@ if ( delete $patron_attrs->{timestamp}; delete $patron_attrs->{verification_token}; delete $patron_attrs->{changed_fields}; + delete $patron_attrs->{extended_attributes}; my $patron = Koha::Patron->new( $patron_attrs )->store; Koha::Patron::Consent->new({ borrowernumber => $patron->borrowernumber, type => 'GDPR_PROCESSING', given_on => $consent_dt })->store if $consent_dt; if ($patron) { - $m->delete(); + if( $m->extended_attributes ){ + $m->borrowernumber( $patron->borrowernumber); + $m->changed_fields(['extended_attributes']); + $m->approve(); + } else { + $m->delete(); + } C4::Form::MessagingPreferences::handle_form_action($cgi, { borrowernumber => $patron->borrowernumber }, $template, 1, C4::Context->preference('PatronSelfRegistrationDefaultCategory') ) if C4::Context->preference('EnhancedMessagingPreferences'); $template->param( password_cleartext => $patron->plain_text_password ); --