uVariables['display_menu'] = true; try { $sUser->RequireAccessLevel(20); $sRouterAuthenticated = true; } catch (InsufficientAccessLevelException $e) { $sMainContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array( 'title' => $locale->strings['error-unauthorized-title'], 'message' => $locale->strings['error-unauthorized-text'] )); $sRouterAuthenticated = false; $router->uVariables['display_menu'] = false; }