Bug 20479: Use $flag instead of fetching patron

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2018-03-27 12:47:54 -03:00
parent d8b3497368
commit 24f25369a5
1 changed files with 2 additions and 1 deletions

View File

@ -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;