From: Jonathan Druart Date: Tue, 27 Mar 2018 15:47:54 +0000 (-0300) Subject: Bug 20479: Use $flag instead of fetching patron X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=24f25369a58d4a2bc2adf92853feeed4337e013e;p=koha.git Bug 20479: Use $flag instead of fetching patron Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart --- diff --git a/C4/Auth.pm b/C4/Auth.pm index e0cbbc5677..3f1c9dd2c5 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -204,7 +204,8 @@ sub get_template_and_user { $in->{template_name} =~ m|sco/| && haspermission( $user, { self_check => 'self_checkout_module' } ) - ) && Koha::Patrons->find({userid=>$user}) && Koha::Patrons->find({userid=>$user})->flags != 1 + ) + && $flags && $flags->{superlibrarian} != 1 ) { $kick_out = 1;