Lines 1247-1266
sub checkauth {
Link Here
|
1247 |
$is_sco_user = 1; |
1247 |
$is_sco_user = 1; |
1248 |
} |
1248 |
} |
1249 |
|
1249 |
|
1250 |
$session->param( 'number', $borrowernumber ); |
1250 |
C4::Context->setup_session({ |
1251 |
$session->param( 'id', $userid ); |
1251 |
session => $session, |
1252 |
$session->param( 'cardnumber', $cardnumber ); |
1252 |
data => { |
1253 |
$session->param( 'firstname', $firstname ); |
1253 |
'number', $borrowernumber, |
1254 |
$session->param( 'surname', $surname ); |
1254 |
'id', $userid, |
1255 |
$session->param( 'branch', $branchcode ); |
1255 |
'cardnumber', $cardnumber, |
1256 |
$session->param( 'branchname', $branchname ); |
1256 |
'firstname', $firstname, |
|
|
1257 |
'surname', $surname, |
1258 |
'branch', $branchcode, |
1259 |
'branchname', $branchname, |
1260 |
'flags', $userflags, |
1261 |
'emailaddress', $emailaddress, |
1262 |
'interface', $type, |
1263 |
}, |
1264 |
}); |
1265 |
|
1266 |
#NOTE: Additional session data needed for this authentication method |
1257 |
$session->param( 'desk_id', $desk_id); |
1267 |
$session->param( 'desk_id', $desk_id); |
1258 |
$session->param( 'desk_name', $desk_name); |
1268 |
$session->param( 'desk_name', $desk_name); |
1259 |
$session->param( 'flags', $userflags ); |
|
|
1260 |
$session->param( 'emailaddress', $emailaddress ); |
1261 |
$session->param( 'ip', $session->remote_addr() ); |
1262 |
$session->param( 'lasttime', time() ); |
1263 |
$session->param( 'interface', $type); |
1264 |
$session->param( 'shibboleth', $shibSuccess ); |
1269 |
$session->param( 'shibboleth', $shibSuccess ); |
1265 |
$session->param( 'register_id', $register_id ); |
1270 |
$session->param( 'register_id', $register_id ); |
1266 |
$session->param( 'register_name', $register_name ); |
1271 |
$session->param( 'register_name', $register_name ); |
Lines 1285-1294
sub checkauth {
Link Here
|
1285 |
$info{'invalid_username_or_password'} = 1; |
1290 |
$info{'invalid_username_or_password'} = 1; |
1286 |
C4::Context::_unset_userenv($sessionID); |
1291 |
C4::Context::_unset_userenv($sessionID); |
1287 |
} |
1292 |
} |
1288 |
$session->param( 'lasttime', time() ); |
1293 |
C4::Context->setup_anon_session({ |
1289 |
$session->param( 'ip', $session->remote_addr() ); |
1294 |
session => $session, |
1290 |
$session->param( 'sessiontype', 'anon' ); |
1295 |
data => { |
1291 |
$session->param( 'interface', $type); |
1296 |
interface => $type, |
|
|
1297 |
}, |
1298 |
}); |
1292 |
} |
1299 |
} |
1293 |
} # END if ( $q_userid |
1300 |
} # END if ( $q_userid |
1294 |
elsif ( $type eq "opac" ) { |
1301 |
elsif ( $type eq "opac" ) { |
Lines 1296-1305
sub checkauth {
Link Here
|
1296 |
# anonymous sessions are created only for the OPAC |
1303 |
# anonymous sessions are created only for the OPAC |
1297 |
|
1304 |
|
1298 |
# setting a couple of other session vars... |
1305 |
# setting a couple of other session vars... |
1299 |
$session->param( 'ip', $session->remote_addr() ); |
1306 |
C4::Context->setup_anon_session({ |
1300 |
$session->param( 'lasttime', time() ); |
1307 |
session => $session, |
1301 |
$session->param( 'sessiontype', 'anon' ); |
1308 |
data => { |
1302 |
$session->param( 'interface', $type); |
1309 |
interface => $type, |
|
|
1310 |
}, |
1311 |
}); |
1303 |
} |
1312 |
} |
1304 |
$session->flush; |
1313 |
$session->flush; |
1305 |
} # END unless ($userid) |
1314 |
} # END unless ($userid) |
Lines 1675-1692
sub check_api_auth {
Link Here
|
1675 |
$branchname = $branches->{$br}->{'branchname'}; |
1684 |
$branchname = $branches->{$br}->{'branchname'}; |
1676 |
} |
1685 |
} |
1677 |
} |
1686 |
} |
1678 |
$session->param( 'number', $borrowernumber ); |
1687 |
|
1679 |
$session->param( 'id', $userid ); |
1688 |
C4::Context->setup_session({ |
1680 |
$session->param( 'cardnumber', $cardnumber ); |
1689 |
session => $session, |
1681 |
$session->param( 'firstname', $firstname ); |
1690 |
data => { |
1682 |
$session->param( 'surname', $surname ); |
1691 |
'number', $borrowernumber, |
1683 |
$session->param( 'branch', $branchcode ); |
1692 |
'id', $userid, |
1684 |
$session->param( 'branchname', $branchname ); |
1693 |
'cardnumber', $cardnumber, |
1685 |
$session->param( 'flags', $userflags ); |
1694 |
'firstname', $firstname, |
1686 |
$session->param( 'emailaddress', $emailaddress ); |
1695 |
'surname', $surname, |
1687 |
$session->param( 'ip', $session->remote_addr() ); |
1696 |
'branch', $branchcode, |
1688 |
$session->param( 'lasttime', time() ); |
1697 |
'branchname', $branchname, |
1689 |
$session->param( 'interface', 'api' ); |
1698 |
'flags', $userflags, |
|
|
1699 |
'emailaddress', $emailaddress, |
1700 |
'interface', 'api', |
1701 |
}, |
1702 |
}); |
1690 |
} |
1703 |
} |
1691 |
$session->param( 'cas_ticket', $cas_ticket); |
1704 |
$session->param( 'cas_ticket', $cas_ticket); |
1692 |
C4::Context->set_userenv( |
1705 |
C4::Context->set_userenv( |