[Koha-bugs] [Bug 31908] Context accessed but not always set on mainpage.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 8 14:31:07 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31908

--- Comment #8 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Apparently not the above.
But this seems to work:

                #if a user enters an id ne to the id in the current session, we
need to log them in...
                #first we need to clear the anonymous session...
                $anon_search_history = $session->param('search_history');
                $session->delete();
                $session->flush;
                $cookie = $cookie_mgr->clear_unless( $query->cookie, @$cookie
);
                C4::Context::_unset_userenv($sessionID);
                $sessionID = undef;
undef $userid;

If we clear $userid here, it will go into the unless($userid) block and get a
new session. Note that $userid and $q_userid are not equal here !

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list