Hide wishlists for logged out users

This commit is contained in:
Jay Trees 2022-03-07 12:14:25 +01:00
parent a36b945ca9
commit 9263b551fd

View file

@ -260,17 +260,6 @@ class Page
$user = new User();
$pages = array(
'wishlists' => array(
'text' => 'Wishlists',
'alignment' => 'left',
'items' => array(
array(
'url' => '/?page=wishlists',
'text' => 'My lists',
'icon' => 'list',
)
),
),
'system' => array(
'text' => 'System',
'icon' => 'wrench',
@ -285,6 +274,20 @@ class Page
),
);
if ($user && $user->isLoggedIn()) {
$pages['wishlists'] = array(
'text' => 'Wishlists',
'alignment' => 'left',
'items' => array(
array(
'url' => '/?page=wishlists',
'text' => 'My lists',
'icon' => 'list',
)
),
);
}
if ($user && $user->isLoggedIn()) {
if (100 === $user->power) {
$pages['account']['items'][] = array(