@@ -, +, @@ --- Koha/Patrons.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) --- a/Koha/Patrons.pm +++ a/Koha/Patrons.pm @@ -208,6 +208,20 @@ sub anonymise_issue_history { return $nb_rows; } +=head3 search + + Koha::Patrons->search(); + +Ensure patron searches do not return internal system users + +=cut + +sub search { + my ( $self, $params, $attr ) = @_; + return $self->SUPER::search( { borrowernumber => { '>' => 0 } } ) + ->SUPER::search( $params, $attr ); +} + =head3 delete Koha::Patrons->search({ some filters here })->delete({ move => 1 }); --