I have the following code:
Auth->user())
{
echo $this->element(\'header\');
}
else
{
e
If it helps anyone out in cakephp version 3.7.8 session has been depriciated to getSession so to update Lee Nielsen's comment
if (is_null($this->request->getSession()->read('Auth.User.username'))) {
echo "....logged out";
} else {
echo "You are Logged in As " . $this->request->getSession()->read('Auth.User.username');
}