Enrico Vazzoler - 2014-03-11

In the provided example we see some unset calls to $_SESSION variables for the logout:

unset($_SESSION['uid']);
unset($_SESSION['username']);
unset($_SESSION['loggedIn']);

But sometimes we use attitional custom $_SESSION variables (i.e. "role", "group", "email", "name and surname", etc.) and we can forget to unset them at the logout.
A short and forget-safe procedure could be:

ulSessionManager::sessionDestroy();

Have a good coding day!