View | Details | Raw Unified | Return to bug 29915
Collapse All | Expand All

(-)a/C4/Auth.pm (-10 / +6 lines)
Lines 929-942 sub checkauth { Link Here
929
                    -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
929
                    -secure => ( C4::Context->https_enabled() ? 1 : 0 ),
930
                );
930
                );
931
931
932
                my $sessiontype = $session->param('sessiontype') || '';
932
                $flags = haspermission( $userid, $flagsrequired );
933
                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...
933
                if ($flags) {
934
                    $flags = haspermission( $userid, $flagsrequired );
934
                    $loggedin = 1;
935
                    if ($flags) {
935
                } else {
936
                        $loggedin = 1;
936
                    $info{'nopermission'} = 1;
937
                    } else {
938
                        $info{'nopermission'} = 1;
939
                    }
940
                }
937
                }
941
            }
938
            }
942
        } elsif ( !$logout ) {
939
        } elsif ( !$logout ) {
Lines 957-963 sub checkauth { Link Here
957
954
958
    unless ( $userid ) {
955
    unless ( $userid ) {
959
        #we initiate a session prior to checking for a username to allow for anonymous sessions...
956
        #we initiate a session prior to checking for a username to allow for anonymous sessions...
960
        my $session = get_session("") or die "Auth ERROR: Cannot get_session()";
957
        $session ||= get_session("") or die "Auth ERROR: Cannot get_session()";
961
958
962
        # Save anonymous search history in new session so it can be retrieved
959
        # Save anonymous search history in new session so it can be retrieved
963
        # by get_template_and_user to store it in user's search history after
960
        # by get_template_and_user to store it in user's search history after
964
- 

Return to bug 29915