|
Lines 196-209
sub get_template_and_user {
Link Here
|
| 196 |
} |
196 |
} |
| 197 |
|
197 |
|
| 198 |
if ( $in->{type} eq 'opac' && $user ) { |
198 |
if ( $in->{type} eq 'opac' && $user ) { |
|
|
199 |
my $is_sco_user; |
| 200 |
if ($sessionID){ |
| 201 |
my $session = get_session($sessionID); |
| 202 |
if ($session){ |
| 203 |
$is_sco_user = $session->param('sco_user'); |
| 204 |
} |
| 205 |
} |
| 199 |
my $kick_out; |
206 |
my $kick_out; |
| 200 |
|
207 |
|
| 201 |
if ( |
208 |
if ( |
| 202 |
# If the user logged in is the SCO user and they try to go out of the SCO module, |
209 |
# If the user logged in is the SCO user and they try to go out of the SCO module, |
| 203 |
# log the user out removing the CGISESSID cookie |
210 |
# log the user out removing the CGISESSID cookie |
| 204 |
$in->{template_name} !~ m|sco/| && $in->{template_name} !~ m|errors/errorpage.tt| |
211 |
$in->{template_name} !~ m|sco/| && $in->{template_name} !~ m|errors/errorpage.tt| |
| 205 |
&& C4::Context->preference('AutoSelfCheckID') |
212 |
&& $is_sco_user |
| 206 |
&& $user eq C4::Context->preference('AutoSelfCheckID') |
|
|
| 207 |
) |
213 |
) |
| 208 |
{ |
214 |
{ |
| 209 |
$kick_out = 1; |
215 |
$kick_out = 1; |
|
Lines 1204-1209
sub checkauth {
Link Here
|
| 1204 |
$branchname = $branches->{$br}->{'branchname'}; |
1210 |
$branchname = $branches->{$br}->{'branchname'}; |
| 1205 |
} |
1211 |
} |
| 1206 |
} |
1212 |
} |
|
|
1213 |
|
| 1214 |
my $is_sco_user = 0; |
| 1215 |
if ( |
| 1216 |
( $query->param('koha_login_context') && ($query->param('koha_login_context') eq 'sco') ) || |
| 1217 |
( $query->param('sco_user_login') && ( $query->param('sco_user_login') eq '1' ) ) |
| 1218 |
){ |
| 1219 |
$is_sco_user = 1; |
| 1220 |
} |
| 1221 |
|
| 1207 |
$session->param( 'number', $borrowernumber ); |
1222 |
$session->param( 'number', $borrowernumber ); |
| 1208 |
$session->param( 'id', $userid ); |
1223 |
$session->param( 'id', $userid ); |
| 1209 |
$session->param( 'cardnumber', $cardnumber ); |
1224 |
$session->param( 'cardnumber', $cardnumber ); |
|
Lines 1221-1226
sub checkauth {
Link Here
|
| 1221 |
$session->param( 'shibboleth', $shibSuccess ); |
1236 |
$session->param( 'shibboleth', $shibSuccess ); |
| 1222 |
$session->param( 'register_id', $register_id ); |
1237 |
$session->param( 'register_id', $register_id ); |
| 1223 |
$session->param( 'register_name', $register_name ); |
1238 |
$session->param( 'register_name', $register_name ); |
|
|
1239 |
$session->param( 'sco_user', $is_sco_user ); |
| 1224 |
} |
1240 |
} |
| 1225 |
$session->param('cas_ticket', $cas_ticket) if $cas_ticket; |
1241 |
$session->param('cas_ticket', $cas_ticket) if $cas_ticket; |
| 1226 |
C4::Context->set_userenv( |
1242 |
C4::Context->set_userenv( |
| 1227 |
- |
|
|