@@ -, +, @@ navigation --- C4/Auth.pm | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -929,14 +929,11 @@ sub checkauth { -secure => ( C4::Context->https_enabled() ? 1 : 0 ), ); - my $sessiontype = $session->param('sessiontype') || ''; - unless ( $sessiontype && $sessiontype eq 'anon' ) { #if this is an anonymous session, we want to update the session, but not behave as if they are logged in... - $flags = haspermission( $userid, $flagsrequired ); - if ($flags) { - $loggedin = 1; - } else { - $info{'nopermission'} = 1; - } + $flags = haspermission( $userid, $flagsrequired ); + if ($flags) { + $loggedin = 1; + } else { + $info{'nopermission'} = 1; } } } elsif ( !$logout ) { @@ -957,7 +954,7 @@ sub checkauth { unless ( $userid ) { #we initiate a session prior to checking for a username to allow for anonymous sessions... - my $session = get_session("") or die "Auth ERROR: Cannot get_session()"; + $session ||= get_session("") or die "Auth ERROR: Cannot get_session()"; # Save anonymous search history in new session so it can be retrieved # by get_template_and_user to store it in user's search history after --