|
Lines 198-211
sub get_template_and_user {
Link Here
|
| 198 |
} |
198 |
} |
| 199 |
|
199 |
|
| 200 |
if ( $in->{type} eq 'opac' && $user ) { |
200 |
if ( $in->{type} eq 'opac' && $user ) { |
|
|
201 |
my $is_sco_user; |
| 202 |
if ($sessionID){ |
| 203 |
my $session = get_session($sessionID); |
| 204 |
if ($session){ |
| 205 |
$is_sco_user = $session->param('sco_user'); |
| 206 |
} |
| 207 |
} |
| 201 |
my $kick_out; |
208 |
my $kick_out; |
| 202 |
|
209 |
|
| 203 |
if ( |
210 |
if ( |
| 204 |
# If the user logged in is the SCO user and they try to go out of the SCO module, |
211 |
# If the user logged in is the SCO user and they try to go out of the SCO module, |
| 205 |
# log the user out removing the CGISESSID cookie |
212 |
# log the user out removing the CGISESSID cookie |
| 206 |
$in->{template_name} !~ m|sco/| && $in->{template_name} !~ m|errors/errorpage.tt| |
213 |
$in->{template_name} !~ m|sco/| && $in->{template_name} !~ m|errors/errorpage.tt| |
| 207 |
&& C4::Context->preference('AutoSelfCheckID') |
214 |
&& ( |
| 208 |
&& $user eq C4::Context->preference('AutoSelfCheckID') |
215 |
$is_sco_user || |
|
|
216 |
( |
| 217 |
C4::Context->preference('AutoSelfCheckID') |
| 218 |
&& $user eq C4::Context->preference('AutoSelfCheckID') |
| 219 |
) |
| 220 |
) |
| 209 |
) |
221 |
) |
| 210 |
{ |
222 |
{ |
| 211 |
$kick_out = 1; |
223 |
$kick_out = 1; |
|
Lines 1173-1178
sub checkauth {
Link Here
|
| 1173 |
$branchname = $branches->{$br}->{'branchname'}; |
1185 |
$branchname = $branches->{$br}->{'branchname'}; |
| 1174 |
} |
1186 |
} |
| 1175 |
} |
1187 |
} |
|
|
1188 |
|
| 1189 |
my $is_sco_user = 0; |
| 1190 |
if ( $query->param('sco_user_login') && ( $query->param('sco_user_login') eq '1' ) ){ |
| 1191 |
$is_sco_user = 1; |
| 1192 |
} |
| 1193 |
|
| 1176 |
$session->param( 'number', $borrowernumber ); |
1194 |
$session->param( 'number', $borrowernumber ); |
| 1177 |
$session->param( 'id', $userid ); |
1195 |
$session->param( 'id', $userid ); |
| 1178 |
$session->param( 'cardnumber', $cardnumber ); |
1196 |
$session->param( 'cardnumber', $cardnumber ); |
|
Lines 1190-1195
sub checkauth {
Link Here
|
| 1190 |
$session->param( 'shibboleth', $shibSuccess ); |
1208 |
$session->param( 'shibboleth', $shibSuccess ); |
| 1191 |
$session->param( 'register_id', $register_id ); |
1209 |
$session->param( 'register_id', $register_id ); |
| 1192 |
$session->param( 'register_name', $register_name ); |
1210 |
$session->param( 'register_name', $register_name ); |
|
|
1211 |
$session->param( 'sco_user', $is_sco_user ); |
| 1193 |
} |
1212 |
} |
| 1194 |
$session->param('cas_ticket', $cas_ticket) if $cas_ticket; |
1213 |
$session->param('cas_ticket', $cas_ticket) if $cas_ticket; |
| 1195 |
C4::Context->set_userenv( |
1214 |
C4::Context->set_userenv( |
| 1196 |
- |
|
|