@@ -, +, @@ OPAC bar, or just click on the "Log in" link) display the login screen, no matter how many times you try to reload it); to break the deadloop, one needs to: - remove session cookie from the browser (or cause the session to expire in some other way - closing browser window would be probably enough for that) - remove offending session on the server (from mysql sessions table, ..) - log in with proper credentials using some other page (like opac/opac-main.pl right-side panel), which does not involve opac/opac-user.pl being called without "userid" CGI parameter. attempts --- C4/Auth.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -967,7 +967,10 @@ sub checkauth { checkpw( $dbh, $userid, $password, $query ); $userid = $retuserid if ($retuserid); $info{'invalid_username_or_password'} = 1 unless ($return); - } } + } + } + + # $return: 1 = valid user, 2 = superlibrarian if ($return) { #_session_log(sprintf "%20s from %16s logged in at %30s.\n", $userid,$ENV{'REMOTE_ADDR'},(strftime '%c', localtime)); @@ -1091,13 +1094,17 @@ sub checkauth { ); } + # $return: 0 = invalid user + # reset to anonymous session else { + $debug and warn "Login failed, resetting anonymous session..."; if ($userid) { $info{'invalid_username_or_password'} = 1; C4::Context->_unset_userenv($sessionID); } $session->param( 'lasttime', time() ); $session->param( 'ip', $session->remote_addr() ); + $session->param( 'sessiontype', 'anon' ); } } # END if ( $userid = $query->param('userid') ) elsif ( $type eq "opac" ) { --