Lines 688-694
sub checkauth {
Link Here
|
688 |
$userid = $session->param('id'); |
688 |
$userid = $session->param('id'); |
689 |
$sessiontype = $session->param('sessiontype'); |
689 |
$sessiontype = $session->param('sessiontype'); |
690 |
} |
690 |
} |
691 |
if ( ($query->param('koha_login_context')) && ($query->param('userid') ne $session->param('id')) ) { |
691 |
if ( ( ($query->param('koha_login_context')) && ($query->param('userid') ne $session->param('id')) ) |
|
|
692 |
|| ( $cas && $query->param('ticket') ) ) { |
692 |
#if a user enters an id ne to the id in the current session, we need to log them in... |
693 |
#if a user enters an id ne to the id in the current session, we need to log them in... |
693 |
#first we need to clear the anonymous session... |
694 |
#first we need to clear the anonymous session... |
694 |
$debug and warn "query id = " . $query->param('userid') . " but session id = " . $session->param('id'); |
695 |
$debug and warn "query id = " . $query->param('userid') . " but session id = " . $session->param('id'); |
Lines 751-757
sub checkauth {
Link Here
|
751 |
C4::Context->_new_userenv($sessionID); |
752 |
C4::Context->_new_userenv($sessionID); |
752 |
$cookie = $query->cookie(CGISESSID => $sessionID); |
753 |
$cookie = $query->cookie(CGISESSID => $sessionID); |
753 |
$userid = $query->param('userid'); |
754 |
$userid = $query->param('userid'); |
754 |
if ($cas || $userid) { |
755 |
if (($cas && $query->param('ticket')) || $userid) { |
755 |
my $password = $query->param('password'); |
756 |
my $password = $query->param('password'); |
756 |
my ($return, $cardnumber); |
757 |
my ($return, $cardnumber); |
757 |
if ($cas && $query->param('ticket')) { |
758 |
if ($cas && $query->param('ticket')) { |
Lines 1117-1123
sub check_api_auth {
Link Here
|
1117 |
unless ($query->param('userid')) { |
1118 |
unless ($query->param('userid')) { |
1118 |
$sessionID = $query->cookie("CGISESSID"); |
1119 |
$sessionID = $query->cookie("CGISESSID"); |
1119 |
} |
1120 |
} |
1120 |
if ($sessionID && not $cas) { |
1121 |
if ($sessionID && not ($cas && $query->param('PT')) ) { |
1121 |
my $session = get_session($sessionID); |
1122 |
my $session = get_session($sessionID); |
1122 |
C4::Context->_new_userenv($sessionID); |
1123 |
C4::Context->_new_userenv($sessionID); |
1123 |
if ($session) { |
1124 |
if ($session) { |
1124 |
- |
|
|