From 9c6090815783ca30effcbe89faf9eed854dd1305 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 20 Jan 2021 12:09:30 +0100 Subject: [PATCH] Bug 27450: Remove password from the mandatory fields when editing details When a patron edit their personal details at the OPAC, the password must be removed from the mandatory fields Test plan: 0 - Don't apply the patch 1 - Set PatronSelfRegistrationBorrowerMandatoryField to require password 2 - Create or sign in as a patron on the opac 3 - Click 'Your personal details' 4 - Attempt to edit 5 - Save changes => They are rejected because not all required fields are populated 6 - Apply the patch 7 - Repeat 3 to 5 => details are saved successfully 8 - Test the self registration feature and confirm that the password is required Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart (cherry picked from commit 4b2c284092eda3f70eaeaa1b136e9c0ae8f17f82) Signed-off-by: Fridolin Somers (cherry picked from commit 06c47d8f5b923ea3eba23b9127c201dd8d780693) Signed-off-by: Andrew Fuerste-Henry (cherry picked from commit af56d2bd590c6433c919f30bba34bb9d40d87b0c) Signed-off-by: Victor Grousset/tuxayo --- 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 3cc0bd8508..8d541a456c 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -250,7 +250,7 @@ elsif ( $action eq 'update' ) { my %borrower = ParseCgiForBorrower($cgi); $borrower{borrowernumber} = $borrowernumber; - my @empty_mandatory_fields = + my @empty_mandatory_fields = grep { $_ ne 'password' } # password is not required when editing personal details CheckMandatoryFields( \%borrower, $action ); my $invalidformfields = CheckForInvalidFields(\%borrower); -- 2.39.5