From 4ef907a15d06e28528d0b70cda6624849817315c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 27 Mar 2018 12:47:54 -0300 Subject: [PATCH] Bug 20479: Use $flag instead of fetching patron Signed-off-by: Tomas Cohen Arazi --- C4/Auth.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.11.0