use Template::Plugin;
use base qw( Template::Plugin );
use List::Util qw(any);
use Koha::Patron::Categories;
sub all {
}
sub can_any_reset_password {
return ( grep { $_->effective_reset_password } @{ Koha::Patron::Categories->search->as_list } )
return ( any { $_->effective_reset_password } @{ Koha::Patron::Categories->search->as_list } )
? 1
: 0;
my $query = new CGI;
use HTML::Entities;
use Try::Tiny;
use List::Util qw/any/;
my ( $template, $dummy, $cookie ) = get_template_and_user(
{
$firstNonEmptyEmail = $emails[0] if @emails;
# Is the given email one of the borrower's ?
if ( $email && !( grep /^$email$/i, @emails ) ) {
if ( $email && !( any { /^$email$/i } @emails ) ) {
$hasError = 1;
$errNoBorrowerFound = 1;
-