Web Development

Having been using CakePHP for more than a year now, I have learned that an authenticated user information can be retrieved 3 ways.

From the Controller

$this->Auth->user('id');

From Everywhere

Being a static method, AuthComponent::user() could be accessed from anywhere.

AuthComponent::user('id');

Through the Session

Another option is to use the Session Component and Session Helper in the controller and view respectively.

$this->Session->read('Auth.User');

References