https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31908 --- Comment #8 from Marcel de Rooy <m.de.rooy@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.