Bugzilla – Attachment 116329 Details for
Bug 27626
Patron self-registration breaks if categorycode and password are hidden
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27626: Fix self registration if categorycode is hidden and PatronSelfRegistrationVerifyByEmail
Bug-27626-Fix-self-registration-if-categorycode-is.patch (text/plain), 1.93 KB, created by
Jonathan Druart
on 2021-02-04 16:42:32 UTC
(
hide
)
Description:
Bug 27626: Fix self registration if categorycode is hidden and PatronSelfRegistrationVerifyByEmail
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-02-04 16:42:32 UTC
Size:
1.93 KB
patch
obsolete
>From 014d7afda863665dee5eabd4ddad0f20941379e6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 4 Feb 2021 17:37:26 +0100 >Subject: [PATCH] Bug 27626: Fix self registration if categorycode is hidden > and PatronSelfRegistrationVerifyByEmail > >If categorycode is selected in >PatronSelfRegistrationBorrowerUnwantedField and >PatronSelfRegistrationVerifyByEmail is turned on, the patron self registration >fails with > [You must provide a patron's category to validate password's strength and length] at /usr/share/perl5/Exception/Class/Base.pm line 88 > >Test plan: >0. Select categorycode in PatronSelfRegistrationBorrowerUnwantedField >and turn on PatronSelfRegistrationVerifyByEmail >1. Self register a patron >2. Confirm that it works as expected with this patch applied. >--- > opac/opac-memberentry.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index c51a18eafa..8f105fb5e7 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -129,6 +129,7 @@ if ( $action eq 'create' ) { > my %borrower = ParseCgiForBorrower($cgi); > > %borrower = DelEmptyFields(%borrower); >+ $borrower{categorycode} ||= C4::Context->preference('PatronSelfRegistrationDefaultCategory'); > > my @empty_mandatory_fields = (CheckMandatoryFields( \%borrower, $action ), CheckMandatoryAttributes( \%borrower, $attributes ) ); > my $invalidformfields = CheckForInvalidFields(\%borrower); >@@ -224,7 +225,6 @@ if ( $action eq 'create' ) { > } > ); > >- $borrower{categorycode} ||= C4::Context->preference('PatronSelfRegistrationDefaultCategory'); > $borrower{password} ||= Koha::AuthUtils::generate_password(Koha::Patron::Categories->find($borrower{categorycode})); > my $consent_dt = delete $borrower{gdpr_proc_consent}; > my $patron = Koha::Patron->new( \%borrower )->store; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27626
:
116329
|
116617
|
117177