use C4::Output;
use C4::Auth;
use C4::Members;
+use C4::Suggestions qw( SearchSuggestion );
use Koha::Patrons;
use Koha::Token;
use Koha::Patron::Categories;
op => 'delete_confirm',
csrf_token => Koha::Token->new->generate_csrf({ session_id => scalar $input->cookie('CGISESSID') }),
);
+
+ # Add warning if patron has pending suggestions
+ $template->param(
+ pending_suggestions => scalar @{
+ C4::Suggestions::SearchSuggestion(
+ { suggestedby => $member, STATUS => 'ASKED' }
+ )
+ }
+ );
} elsif ( $op eq 'delete_confirmed' ) {
output_and_exit( $input, $cookie, $template, 'wrong_csrf_token' )
unless Koha::Token->new->check_csrf( {