[Koha-bugs] [Bug 20023] Password recovery should be case insensitive

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 21 15:20:10 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20023

--- Comment #11 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Comment on attachment 79204
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79204
Bug 20023: (QA follow-up) Tiny simplification

Review of attachment 79204:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=20023&attachment=79204)
-----------------------------------------------------------------

::: opac/opac-password-recovery.pl
@@ +73,4 @@
>          $errMultipleAccountsForEmail = 1;
>      }
>      elsif ( $borrower = $search_results->next() ) {    # One matching borrower
> +        my @emails = grep { $_ && !/^\s+$/ } ( $borrower->email, $borrower->emailpro, $borrower->B_email );

Not sure this is simplification :)

@@ +77,2 @@
>  
> +        my $firstNonEmptyEmail = @emails ? $emails[0] : undef;

So simplify it, really :)
  my $firstNonEmptyEmail = shift @emails;

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list