Lines 690-696
sub checkauth {
Link Here
|
690 |
$userid = $s_userid; |
690 |
$userid = $s_userid; |
691 |
$sessiontype = $session->param('sessiontype') || ''; |
691 |
$sessiontype = $session->param('sessiontype') || ''; |
692 |
} |
692 |
} |
693 |
if ( ( $query->param('koha_login_context') && ($q_userid ne $s_userid) |
693 |
if ( ( $query->param('koha_login_context') && |
|
|
694 |
($q_userid ne $s_userid) ) |
694 |
|| ( $cas && $query->param('ticket') ) ) { |
695 |
|| ( $cas && $query->param('ticket') ) ) { |
695 |
#if a user enters an id ne to the id in the current session, we need to log them in... |
696 |
#if a user enters an id ne to the id in the current session, we need to log them in... |
696 |
#first we need to clear the anonymous session... |
697 |
#first we need to clear the anonymous session... |
Lines 714-720
sub checkauth {
Link Here
|
714 |
logout_cas($query); |
715 |
logout_cas($query); |
715 |
} |
716 |
} |
716 |
} |
717 |
} |
717 |
elsif ( $lasttime && ($lasttime < time() - $timeout) ) { |
718 |
elsif ( !$lasttime || ($lasttime < time() - $timeout) ) { |
718 |
# timed logout |
719 |
# timed logout |
719 |
$info{'timed_out'} = 1; |
720 |
$info{'timed_out'} = 1; |
720 |
$session->delete() if $session; |
721 |
$session->delete() if $session; |
Lines 838-844
sub checkauth {
Link Here
|
838 |
my $retuserid; |
839 |
my $retuserid; |
839 |
( $return, $cardnumber, $retuserid ) = |
840 |
( $return, $cardnumber, $retuserid ) = |
840 |
checkpw( $dbh, $userid, $password, $query ); |
841 |
checkpw( $dbh, $userid, $password, $query ); |
841 |
$userid = $retuserid if ( $retuserid ne '' ); |
842 |
$userid = $retuserid if ( $retuserid ); |
842 |
} |
843 |
} |
843 |
if ($return) { |
844 |
if ($return) { |
844 |
#_session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime)); |
845 |
#_session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime)); |
845 |
- |
|
|