I have a problem on this line 'href' => 'index.php?action=profile&user='.escape($user->data()->username).'',
When the user is logged out, i get that error, but when i login, i dont get the error.
function toolbar_section()
{
$user = new User();
global $variables;
$variables['menu_buttons'] = array(
'home' => array(
'title' => 'Pocetna',
'href' => 'index.php',
'show' => true,
),
'profile' => array(
'title' => 'Profil',
'href' => 'index.php?action=profile&user='.escape($user->data()->username).'',
'logged' => true,
),
'logout' => array(
'title' => 'Odjava',
'href' => 'index.php?action=logout',
'logged' => true,
),
);
}