I have the following code:
Auth->user()) { echo $this->element(\'header\'); } else { e
in cakephp 3 you can check authentication session in the view like this
if($this->request->Session()->read('Auth.User')){ //do when login } else{ //do not login }