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'));
    }