diff --git a/C4/Auth.pm b/C4/Auth.pm index e9b8c0e8d9..62094e8a8d 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1842,6 +1842,8 @@ sub check_cookie_auth { } else { return ( "anon", $session ); } + # If here user was logged in, but doesn't have correct permissions + # could be an 'else' at `if($flags) return "ok"` , but left here to catch any errors $session->delete(); $session->flush; C4::Context->_unset_userenv($sessionID);