Lines 38-43
use Koha::Checkouts;
Link Here
|
38 |
use Koha::DateUtils qw(dt_from_string); |
38 |
use Koha::DateUtils qw(dt_from_string); |
39 |
use Koha::Library::Groups; |
39 |
use Koha::Library::Groups; |
40 |
use Koha::Libraries; |
40 |
use Koha::Libraries; |
|
|
41 |
use Koha::Cash::Registers; |
41 |
use Koha::Desks; |
42 |
use Koha::Desks; |
42 |
use Koha::Patrons; |
43 |
use Koha::Patrons; |
43 |
use Koha::Patron::Consents; |
44 |
use Koha::Patron::Consents; |
Lines 858-864
sub checkauth {
Link Here
|
858 |
$session->param('branchname'), $session->param('flags'), |
859 |
$session->param('branchname'), $session->param('flags'), |
859 |
$session->param('emailaddress'), $session->param('shibboleth'), |
860 |
$session->param('emailaddress'), $session->param('shibboleth'), |
860 |
$session->param('desk_id'), $session->param('desk_name'), |
861 |
$session->param('desk_id'), $session->param('desk_name'), |
861 |
$session->param('register_id') |
862 |
$session->param('register_id'), $session->param('register_name') |
862 |
); |
863 |
); |
863 |
C4::Context::set_shelves_userenv( 'bar', $session->param('barshelves') ); |
864 |
C4::Context::set_shelves_userenv( 'bar', $session->param('barshelves') ); |
864 |
C4::Context::set_shelves_userenv( 'pub', $session->param('pubshelves') ); |
865 |
C4::Context::set_shelves_userenv( 'pub', $session->param('pubshelves') ); |
Lines 1081-1087
sub checkauth {
Link Here
|
1081 |
} |
1082 |
} |
1082 |
my ( $borrowernumber, $firstname, $surname, $userflags, |
1083 |
my ( $borrowernumber, $firstname, $surname, $userflags, |
1083 |
$branchcode, $branchname, $emailaddress, $desk_id, |
1084 |
$branchcode, $branchname, $emailaddress, $desk_id, |
1084 |
$desk_name, $register_id ); |
1085 |
$desk_name, $register_id, $register_name ); |
1085 |
|
1086 |
|
1086 |
if ( $return == 1 ) { |
1087 |
if ( $return == 1 ) { |
1087 |
my $select = " |
1088 |
my $select = " |
Lines 1132-1137
sub checkauth {
Link Here
|
1132 |
} |
1133 |
} |
1133 |
if ( $query->param('register_id') ) { |
1134 |
if ( $query->param('register_id') ) { |
1134 |
$register_id = $query->param('register_id'); |
1135 |
$register_id = $query->param('register_id'); |
|
|
1136 |
my $register = Koha::Cash::Registers->find($register_id); |
1137 |
$register_name = $register ? $register->name : ''; |
1135 |
} |
1138 |
} |
1136 |
my $branches = { map { $_->branchcode => $_->unblessed } Koha::Libraries->search }; |
1139 |
my $branches = { map { $_->branchcode => $_->unblessed } Koha::Libraries->search }; |
1137 |
if ( $type ne 'opac' and C4::Context->boolean_preference('AutoLocation') ) { |
1140 |
if ( $type ne 'opac' and C4::Context->boolean_preference('AutoLocation') ) { |
Lines 1178-1183
sub checkauth {
Link Here
|
1178 |
$session->param( 'interface', $type); |
1181 |
$session->param( 'interface', $type); |
1179 |
$session->param( 'shibboleth', $shibSuccess ); |
1182 |
$session->param( 'shibboleth', $shibSuccess ); |
1180 |
$session->param( 'register_id', $register_id ); |
1183 |
$session->param( 'register_id', $register_id ); |
|
|
1184 |
$session->param( 'register_name', $register_name ); |
1181 |
$debug and printf STDERR "AUTH_4: (%s)\t%s %s - %s\n", map { $session->param($_) } qw(cardnumber firstname surname branch); |
1185 |
$debug and printf STDERR "AUTH_4: (%s)\t%s %s - %s\n", map { $session->param($_) } qw(cardnumber firstname surname branch); |
1182 |
} |
1186 |
} |
1183 |
$session->param('cas_ticket', $cas_ticket) if $cas_ticket; |
1187 |
$session->param('cas_ticket', $cas_ticket) if $cas_ticket; |
Lines 1188-1194
sub checkauth {
Link Here
|
1188 |
$session->param('branchname'), $session->param('flags'), |
1192 |
$session->param('branchname'), $session->param('flags'), |
1189 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1193 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1190 |
$session->param('desk_id'), $session->param('desk_name'), |
1194 |
$session->param('desk_id'), $session->param('desk_name'), |
1191 |
$session->param('register_id') |
1195 |
$session->param('register_id'), $session->param('register_name') |
1192 |
); |
1196 |
); |
1193 |
|
1197 |
|
1194 |
} |
1198 |
} |
Lines 1468-1474
sub check_api_auth {
Link Here
|
1468 |
$session->param('branchname'), $session->param('flags'), |
1472 |
$session->param('branchname'), $session->param('flags'), |
1469 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1473 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1470 |
$session->param('desk_id'), $session->param('desk_name'), |
1474 |
$session->param('desk_id'), $session->param('desk_name'), |
1471 |
$session->param('register_id') |
1475 |
$session->param('register_id'), $session->param('register_name') |
1472 |
); |
1476 |
); |
1473 |
|
1477 |
|
1474 |
my $ip = $session->param('ip'); |
1478 |
my $ip = $session->param('ip'); |
Lines 1632-1638
sub check_api_auth {
Link Here
|
1632 |
$session->param('branchname'), $session->param('flags'), |
1636 |
$session->param('branchname'), $session->param('flags'), |
1633 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1637 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1634 |
$session->param('desk_id'), $session->param('desk_name'), |
1638 |
$session->param('desk_id'), $session->param('desk_name'), |
1635 |
$session->param('register_id') |
1639 |
$session->param('register_id'), $session->param('register_name') |
1636 |
); |
1640 |
); |
1637 |
return ( "ok", $cookie, $sessionID ); |
1641 |
return ( "ok", $cookie, $sessionID ); |
1638 |
} else { |
1642 |
} else { |
Lines 1722-1728
sub check_cookie_auth {
Link Here
|
1722 |
$session->param('branchname'), $session->param('flags'), |
1726 |
$session->param('branchname'), $session->param('flags'), |
1723 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1727 |
$session->param('emailaddress'), $session->param('shibboleth'), |
1724 |
$session->param('desk_id'), $session->param('desk_name'), |
1728 |
$session->param('desk_id'), $session->param('desk_name'), |
1725 |
$session->param('register_id') |
1729 |
$session->param('register_id'), $session->param('register_name') |
1726 |
); |
1730 |
); |
1727 |
|
1731 |
|
1728 |
my $ip = $session->param('ip'); |
1732 |
my $ip = $session->param('ip'); |