View | Details | Raw Unified | Return to bug 21890
Collapse All | Expand All

(-)a/Koha/Template/Plugin/Categories.pm (-1 / +2 lines)
Lines 20-25 use Modern::Perl; Link Here
20
use Template::Plugin;
20
use Template::Plugin;
21
use base qw( Template::Plugin );
21
use base qw( Template::Plugin );
22
22
23
use List::Util qw(any);
23
use Koha::Patron::Categories;
24
use Koha::Patron::Categories;
24
25
25
sub all {
26
sub all {
Lines 34-40 sub GetName { Link Here
34
}
35
}
35
36
36
sub can_any_reset_password {
37
sub can_any_reset_password {
37
    return ( grep { $_->effective_reset_password } @{ Koha::Patron::Categories->search->as_list } )
38
    return ( any { $_->effective_reset_password } @{ Koha::Patron::Categories->search->as_list } )
38
        ? 1
39
        ? 1
39
        : 0;
40
        : 0;
40
}
41
}
(-)a/opac/opac-password-recovery.pl (-2 / +2 lines)
Lines 14-19 use Koha::Patrons; Link Here
14
my $query = new CGI;
14
my $query = new CGI;
15
use HTML::Entities;
15
use HTML::Entities;
16
use Try::Tiny;
16
use Try::Tiny;
17
use List::Util qw/any/;
17
18
18
my ( $template, $dummy, $cookie ) = get_template_and_user(
19
my ( $template, $dummy, $cookie ) = get_template_and_user(
19
    {
20
    {
Lines 84-90 if ( $query->param('sendEmail') || $query->param('resendEmail') ) { Link Here
84
            $firstNonEmptyEmail = $emails[0] if @emails;
85
            $firstNonEmptyEmail = $emails[0] if @emails;
85
86
86
            # Is the given email one of the borrower's ?
87
            # Is the given email one of the borrower's ?
87
            if ( $email && !( grep /^$email$/i, @emails ) ) {
88
            if ( $email && !( any { /^$email$/i } @emails ) ) {
88
                $hasError    = 1;
89
                $hasError    = 1;
89
                $errNoBorrowerFound = 1;
90
                $errNoBorrowerFound = 1;
90
            }
91
            }
91
- 

Return to bug 21890