Bugzilla – Attachment 79202 Details for
Bug 20023
Password recovery should be case insensitive
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20023: (QA follow-up) Tiny simplification
Bug-20023-QA-follow-up-Tiny-simplification.patch (text/plain), 1.45 KB, created by
Marcel de Rooy
on 2018-09-21 09:41:14 UTC
(
hide
)
Description:
Bug 20023: (QA follow-up) Tiny simplification
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-09-21 09:41:14 UTC
Size:
1.45 KB
patch
obsolete
>From e12367404874a07517ab40de18805ef748f17067 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 21 Sep 2018 11:38:15 +0200 >Subject: [PATCH] Bug 20023: (QA follow-up) Tiny simplification >Content-Type: text/plain; charset=utf-8 > >Remove empty emails from the list rightaway (incl. all spaces). >Would be tempted to lc the params->{email} at the start btw.. >--- > opac/opac-password-recovery.pl | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > >diff --git a/opac/opac-password-recovery.pl b/opac/opac-password-recovery.pl >index 4c28b0f..be77a8a 100755 >--- a/opac/opac-password-recovery.pl >+++ b/opac/opac-password-recovery.pl >@@ -73,13 +73,9 @@ if ( $query->param('sendEmail') || $query->param('resendEmail') ) { > $errMultipleAccountsForEmail = 1; > } > elsif ( $borrower = $search_results->next() ) { # One matching borrower >- my @emails = ( $borrower->email || '', $borrower->emailpro || '', $borrower->B_email || ''); >+ my @emails = grep { $_ && !/^\s+$/ } ( $borrower->email, $borrower->emailpro, $borrower->B_email ); > >- my $firstNonEmptyEmail = ''; >- foreach my $address ( @emails ) { >- $firstNonEmptyEmail = $address if length $address; >- last if $firstNonEmptyEmail; >- } >+ my $firstNonEmptyEmail = @emails ? $emails[0] : undef; > > # Is the given email one of the borrower's ? > if ( $email && !( grep /^$email$/i, @emails ) ) { >-- >2.1.4
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 20023
:
79037
|
79070
|
79086
|
79125
|
79201
|
79202
|
79203
|
79204
|
79270
|
79271
|
81985