Lines 675-681
sub checkauth {
Link Here
|
675 |
$userid = $session->param('id'); |
675 |
$userid = $session->param('id'); |
676 |
$sessiontype = $session->param('sessiontype'); |
676 |
$sessiontype = $session->param('sessiontype'); |
677 |
} |
677 |
} |
678 |
if ( ($query->param('koha_login_context')) && ($query->param('userid') ne $session->param('id')) ) { |
678 |
if ( ( ($query->param('koha_login_context')) && ($query->param('userid') ne $session->param('id')) ) |
|
|
679 |
|| ( $cas && $query->param('ticket') ) ) { |
679 |
#if a user enters an id ne to the id in the current session, we need to log them in... |
680 |
#if a user enters an id ne to the id in the current session, we need to log them in... |
680 |
#first we need to clear the anonymous session... |
681 |
#first we need to clear the anonymous session... |
681 |
$debug and warn "query id = " . $query->param('userid') . " but session id = " . $session->param('id'); |
682 |
$debug and warn "query id = " . $query->param('userid') . " but session id = " . $session->param('id'); |
Lines 738-744
sub checkauth {
Link Here
|
738 |
C4::Context->_new_userenv($sessionID); |
739 |
C4::Context->_new_userenv($sessionID); |
739 |
$cookie = $query->cookie(CGISESSID => $sessionID); |
740 |
$cookie = $query->cookie(CGISESSID => $sessionID); |
740 |
$userid = $query->param('userid'); |
741 |
$userid = $query->param('userid'); |
741 |
if ($cas || $userid) { |
742 |
if (($cas && $query->param('ticket')) || $userid) { |
742 |
my $password = $query->param('password'); |
743 |
my $password = $query->param('password'); |
743 |
my ($return, $cardnumber); |
744 |
my ($return, $cardnumber); |
744 |
if ($cas && $query->param('ticket')) { |
745 |
if ($cas && $query->param('ticket')) { |
Lines 1103-1109
sub check_api_auth {
Link Here
|
1103 |
unless ($query->param('userid')) { |
1104 |
unless ($query->param('userid')) { |
1104 |
$sessionID = $query->cookie("CGISESSID"); |
1105 |
$sessionID = $query->cookie("CGISESSID"); |
1105 |
} |
1106 |
} |
1106 |
if ($sessionID && not $cas) { |
1107 |
if ($sessionID && not ($cas && $query->param('PT')) ) { |
1107 |
my $session = get_session($sessionID); |
1108 |
my $session = get_session($sessionID); |
1108 |
C4::Context->_new_userenv($sessionID); |
1109 |
C4::Context->_new_userenv($sessionID); |
1109 |
if ($session) { |
1110 |
if ($session) { |
1110 |
- |
|
|