src/Controller/UsersController.php
public function profile()
    {
        $userId = $this->Auth->user('id');
        if (!$userId) {
            $this->Flash->error(__d('community', 'You are not logged in'));
            $this->redirect($this->Auth->getConfig('loginAction'));
        }

        $this
            ->set('user', $this->Users->get($userId, ['contain' => 'Groups']))
            ->set('page_title', __d('community', 'Edit profile'));
    }
public function profile()
    {
        $userId = $this->Auth->user('id');
        if (!$userId) {
            $this->Flash->error(__d('community', 'You are not logged in'));
            $this->redirect($this->Auth->getConfig('loginAction'));
        }

        $this
            ->set('user', $this->Users->get($userId, ['contain' => 'Groups']))
            ->set('page_title', __d('community', 'Edit profile'));
    }
public function profile ( ) { $ userId = $ this -> Auth -> user ( 'id' ) ; if ( ! $ userId ) { $ this -> Flash -> error ( __d ( 'community' , 'You are not logged in' ) ) ; $ this -> redirect ( $ this -> Auth -> getConfig ( 'loginAction' ) ) ; } $ this -> set ( 'user' , $ this -> Users -> get ( $ userId , [ 'contain' => 'Groups' ] ) ) -> set ( 'page_title' , __d ( 'community' , 'Edit profile' ) ) ; }
Default profile page action.

@return  void

@throws  \Aura\Intl\Exception
Default profile page action .