fixes #1594 in guest_access=false mode, hide menus for guests

This commit is contained in:
plegall 2022-01-04 16:32:07 +01:00
parent 4acfca116b
commit 303f8b87a3

View file

@ -22,7 +22,12 @@ function initialize_menu()
global $page, $conf, $user, $template, $filter; global $page, $conf, $user, $template, $filter;
$menu = new BlockManager("menubar"); $menu = new BlockManager("menubar");
$menu->load_registered_blocks();
// if guest_access is disabled, we only display the menus if the user is identified
if ($conf['guest_access'] or !is_a_guest())
{
$menu->load_registered_blocks();
}
$menu->prepare_display(); $menu->prepare_display();
if ( @$page['section']=='search' and isset($page['qsearch_details']) ) if ( @$page['section']=='search' and isset($page['qsearch_details']) )