Hi rosali,
Thanks for your answer.
It's courious, startup hook is triggered two times, first time $_SESSION['username'] is not set, but yes at second time... I don't understand this behaviour, so I've used the afterLogin hook + async command (AJAX) to achieve my objective (hide the calendar icon when user has no CalDAV access).
Thanks again,
Antonio.